(command.CommandList
  children: [
    (command.ShFunction
      name_tok: <k_script_build>
      name: k_script_build
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'KOALEPHANT_TOOL_VERSION='> (DQ <1.0.0>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [
                {<local>}
                {<Id.Lit_VarLike 'KOALEPHANT_TOOL_DESCRIPTION='> 
                  (DQ 
                    <
'Process shell source (.) statements into absolute references or inline the script'
                    >
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [
                {<local>}
                {<Id.Lit_VarLike 'KOALEPHANT_TOOL_OPTIONS='> 
                  (DQ 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Simple
                          blame_tok: <cat>
                          more_env: []
                          words: [{<cat>}]
                          redirects: [
                            (Redir
                              op: <Id.Redir_DLessDash '<<-'>
                              loc: (redir_loc.Fd fd:0)
                              arg: 
                                (redir_param.HereDoc
                                  here_begin: {<EOT>}
                                  here_end_tok: <Id.Undefined_Tok ''>
                                  stdin_parts: [
                                    <'Options:\n'>
                                    <'\n'>
                                    <
' -c, --cd                           change to the input file directory before building\n'
                                    >
                                    <
' -f, --file file                    the source to read. If not specified, defaults to stdin\n'
                                    >
                                    <
' -o, --output file                  the file to write to. If not specified, defaults to stdout\n'
                                    >
                                    <
' -d, --define var=val               define simple replacements to be performed while processing e.g. LIB_PATH=/foo\n'
                                    >
                                    <
' -i, --inline, --static path        dir or file path to explicitly inline. Can be specified multiple times\n'
                                    >
                                    <
' -l, --link, --dynamic path=abs     dir or file path to explicitly link to. Can be specified multiple times\n'
                                    >
                                    <
' -r, --report                       process input and report all discovered inclusions\n'
                                    >
                                    <
' -x, --executable                   mark the resulting file (if not stdout) executable\n'
                                    >
                                    <' -h, --help                         show this help\n'>
                                    <' -v, --version                      show the version\n'>
                                    <' -V, --verbose                      show verbose output\n'>
                                    <' -D, --debug                        show debug output\n'>
                                    <
' -q, --quiet                        suppress all output except errors\n'
                                    >
                                    <'\n'>
                                  ]
                                )
                            )
                          ]
                          do_fork: T
                        )
                      right: <Id.Eof_RParen _>
                    )
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [
                {<local>}
                {<Id.Lit_VarLike 'FIND_SOURCE_LINES='> 
                  (DQ <'s/^'> <Id.Lit_BadBackslash '\\'> <'s*'> <Id.Lit_BadBackslash '\\'> 
                    <'. (.*)/K_SCRIPT_BUILD_REPORT'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'> ch:'\\') <'1/p'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <readonly>
              more_env: []
              words: [{<readonly>} {<FIND_SOURCE_LINES>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'FIX_NEWLINES='> (SQ <'$a\\\\'>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <readonly>
              more_env: []
              words: [{<readonly>} {<FIX_NEWLINES>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'infile='> <'/dev/stdin'>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'outfile='> <'/dev/stdout'>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'executable='> <false>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'report='> <false>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'changeDir='> <false>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'changeDirPath='> (DQ )}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'sourcePaths='> (DQ )}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'definitions='> (DQ )}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [
                {<local>}
                {<Id.Lit_VarLike 'newline='> 
                  (DQ 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Simple
                          blame_tok: <printf>
                          more_env: []
                          words: [{<printf>} {(SQ <'\\n '>)}]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Eof_RParen _>
                    )
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'newline='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'newline='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'newline='> name:newline)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (BracedVarSub
                          left: <Id.Left_DollarBrace '${'>
                          token: <Id.VSub_Name newline>
                          var_name: newline
                          suffix_op: (suffix_op.Unary op:<Id.VOp1_Percent '%'> arg_word:{<' '>})
                          right: <Id.Right_DollarBrace '}'>
                        )
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <.>
              more_env: []
              words: [{<.>} {<'./shell-script-library.lib.sh'>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <k_log_level>
              more_env: []
              words: [{<k_log_level>} {(${ Id.VSub_Name KOALEPHANT_LOG_LEVEL_NOTICE)}]
              redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
              do_fork: T
            )
            (command.ShFunction
              name_tok: <add_source_path>
              name: add_source_path
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [{<local>} {<Id.Lit_VarLike 'type='> (DQ ($ Id.VSub_Number 1))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [{<local>} {<Id.Lit_VarLike 'source='> (DQ ($ Id.VSub_Number 2))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [
                        {<local>}
                        {<Id.Lit_VarLike 'value='> 
                          (DQ 
                            (BracedVarSub
                              left: <Id.Left_DollarBrace '${'>
                              token: <Id.VSub_Number 3>
                              var_name: 3
                              suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:(rhs_word__Empty))
                              right: <Id.Right_DollarBrace '}'>
                            )
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [{<local>} {<Id.Lit_VarLike 'sep='> (DQ )}]
                      redirects: []
                      do_fork: T
                    )
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      blame_tok: <Id.Lit_LBracket '['>
                                      more_env: []
                                      words: [
                                        {<Id.Lit_LBracket '['>}
                                        {<-n>}
                                        {(DQ (${ Id.VSub_Name sourcePaths))}
                                        {<Id.Lit_RBracket ']'>}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'sep='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'sep='>
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'sep='> name:sep)
                                  op: assign_op.Equal
                                  rhs: {(DQ <Id.Lit_BadBackslash '\\'> <n>)}
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [249 264]
                        )
                      ]
                      else_action: []
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'sourcePaths='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'sourcePaths='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'sourcePaths='>
                              name: sourcePaths
                            )
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (CommandSub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: 
                                    (command.Simple
                                      blame_tok: <printf>
                                      more_env: []
                                      words: [
                                        {<printf>}
                                        {(DQ <'%s'> (${ Id.VSub_Name sep) <'%s#%s#%s'>)}
                                        {(DQ (${ Id.VSub_Name sourcePaths))}
                                        {(DQ (${ Id.VSub_Name type))}
                                        {(DQ (${ Id.VSub_Name source))}
                                        {(DQ (${ Id.VSub_Name value))}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  right: <Id.Eof_RParen _>
                                )
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <add_dynamic_mapping>
              name: add_dynamic_mapping
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [{<local>} {<Id.Lit_VarLike 'find='> (DQ ($ Id.VSub_Number 1))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [{<local>} {<Id.Lit_VarLike 'target='> (DQ ($ Id.VSub_Number 2))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <k_log_info>
                      more_env: []
                      words: [
                        {<k_log_info>}
                        {
                          (DQ <'Adding dynamic mapping for \''> (${ Id.VSub_Name find) <'\' => \''> 
                            (${ Id.VSub_Name target) <'\''>
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <add_source_path>
                      more_env: []
                      words: [
                        {<add_source_path>}
                        {<dynamic>}
                        {(DQ (${ Id.VSub_Name find))}
                        {(DQ (${ Id.VSub_Name target))}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <add_static_path>
              name: add_static_path
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [{<local>} {<Id.Lit_VarLike 'path='> (DQ ($ Id.VSub_Number 1))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <k_log_info>
                      more_env: []
                      words: [
                        {<k_log_info>}
                        {(DQ <'Adding static path for \''> (${ Id.VSub_Name path) <'\''>)}
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <add_source_path>
                      more_env: []
                      words: [{<add_source_path>} {<static>} {(DQ (${ Id.VSub_Name path))}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <add_definition>
              name: add_definition
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [{<local>} {<Id.Lit_VarLike 'definition='> (DQ ($ Id.VSub_Number 1))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [{<local>} {<Id.Lit_VarLike 'value='> (DQ ($ Id.VSub_Number 2))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [{<local>} {<Id.Lit_VarLike 'sep='> (DQ )}]
                      redirects: []
                      do_fork: T
                    )
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      blame_tok: <Id.Lit_LBracket '['>
                                      more_env: []
                                      words: [
                                        {<Id.Lit_LBracket '['>}
                                        {<-n>}
                                        {(DQ (${ Id.VSub_Name definitions))}
                                        {<Id.Lit_RBracket ']'>}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'sep='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'sep='>
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'sep='> name:sep)
                                  op: assign_op.Equal
                                  rhs: {(DQ <Id.Lit_BadBackslash '\\'> <n>)}
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [454 469]
                        )
                      ]
                      else_action: []
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                    (command.Simple
                      blame_tok: <k_log_info>
                      more_env: []
                      words: [
                        {<k_log_info>}
                        {
                          (DQ <'Adding definition for \''> (${ Id.VSub_Name definition) 
                            <'\' with value \''> (${ Id.VSub_Name value) <'\''>
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'definitions='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'definitions='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'definitions='>
                              name: definitions
                            )
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (CommandSub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: 
                                    (command.Simple
                                      blame_tok: <printf>
                                      more_env: []
                                      words: [
                                        {<printf>}
                                        {(DQ <'%s'> (${ Id.VSub_Name sep) <'%s %s'>)}
                                        {(DQ (${ Id.VSub_Name definitions))}
                                        {(DQ ($ Id.VSub_DollarName definition))}
                                        {(DQ (${ Id.VSub_Name value))}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  right: <Id.Eof_RParen _>
                                )
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <get_definition_pattern>
              name: get_definition_pattern
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Pipeline
                      children: [
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [{<echo>} {(DQ (${ Id.VSub_Name definitions))}]
                          redirects: []
                          do_fork: T
                        )
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      blame_tok: <read>
                                      more_env: [
                                        (EnvPair
                                          left: <Id.Lit_VarLike 'IFS='>
                                          name: IFS
                                          val: {(DQ <' '>)}
                                        )
                                      ]
                                      words: [{<read>} {<-r>} {<key>} {<value>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          body: 
                            (command.DoGroup
                              left: <Id.KW_Do do>
                              children: [
                                (command.If
                                  if_kw: <Id.KW_If if>
                                  arms: [
                                    (IfArm
                                      keyword: <Id.KW_If if>
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (command.Sentence
                                              child: 
                                                (command.Simple
                                                  blame_tok: <Id.Lit_LBracket '['>
                                                  more_env: []
                                                  words: [
                                                    {<Id.Lit_LBracket '['>}
                                                    {<-z>}
                                                    {(DQ (${ Id.VSub_Name key))}
                                                    {<Id.Lit_RBracket ']'>}
                                                  ]
                                                  redirects: []
                                                  do_fork: T
                                                )
                                              terminator: <Id.Op_Semi _>
                                            )
                                          ]
                                        )
                                      then_kw: <Id.KW_Then then>
                                      action: [
                                        (command.ControlFlow
                                          keyword: <Id.ControlFlow_Continue continue>
                                        )
                                      ]
                                      spids: [571 586]
                                    )
                                  ]
                                  else_action: []
                                  fi_kw: <Id.KW_Fi fi>
                                  redirects: []
                                )
                                (command.Simple
                                  blame_tok: <k_log_debug>
                                  more_env: []
                                  words: [
                                    {<k_log_debug>}
                                    {
                                      (DQ <'Using definition: \''> (${ Id.VSub_Name key) <'\' = \''> 
                                        (${ Id.VSub_Name value) <'\''>
                                      )
                                    }
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                                (command.Simple
                                  blame_tok: <printf>
                                  more_env: []
                                  words: [
                                    {<printf>}
                                    {
                                      (DQ <'s#([^A-Za-z0-9_])%s([^A-Za-z0-9_])#'> 
                                        (word_part.EscapedLiteral
                                          token: <Id.Lit_EscapedChar '\\\\'>
                                          ch: '\\'
                                        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'> ch:'\\') <'1%s'> 
                                        (word_part.EscapedLiteral
                                          token: <Id.Lit_EscapedChar '\\\\'>
                                          ch: '\\'
                                        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'> ch:'\\') <'2#g; '>
                                      )
                                    }
                                    {(DQ (${ Id.VSub_Name key))}
                                    {(DQ (${ Id.VSub_Name value))}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              right: <Id.KW_Done done>
                            )
                          redirects: []
                        )
                      ]
                      ops: [<Id.Op_Pipe _>]
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <get_include_pattern>
              name: get_include_pattern
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Pipeline
                      children: [
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [{<echo>} {(DQ (${ Id.VSub_Name sourcePaths))}]
                          redirects: []
                          do_fork: T
                        )
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      blame_tok: <read>
                                      more_env: [
                                        (EnvPair
                                          left: <Id.Lit_VarLike 'IFS='>
                                          name: IFS
                                          val: {(DQ <'#'>)}
                                        )
                                      ]
                                      words: [{<read>} {<-r>} {<type>} {<source>} {<value>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          body: 
                            (command.DoGroup
                              left: <Id.KW_Do do>
                              children: [
                                (command.Case
                                  case_kw: <Id.KW_Case case>
                                  to_match: (case_arg.Word w:{(DQ (${ Id.VSub_Name type))})
                                  arms_start: <Id.KW_In in>
                                  arms: [
                                    (CaseArm
                                      left: <dynamic>
                                      pattern: (pat.Words words:[{<dynamic>}])
                                      middle: <Id.Right_CasePat _>
                                      action: [
                                        (command.Simple
                                          blame_tok: <printf>
                                          more_env: []
                                          words: [
                                            {<printf>}
                                            {(DQ <'s#%s#%s#g; '>)}
                                            {
                                              (DQ <'^('> <Id.Lit_BadBackslash '\\'> <'s*'> 
                                                <Id.Lit_BadBackslash '\\'> <.> <Id.Lit_BadBackslash '\\'> <'s+)(['> <Id.Lit_BadBackslash '\\'> <'\''> 
                                                (word_part.EscapedLiteral
                                                  token: <Id.Lit_EscapedChar '\\"'>
                                                  ch: '"'
                                                ) <']?)('> 
                                                (CommandSub
                                                  left_token: <Id.Left_DollarParen '$('>
                                                  child: 
                                                    (command.Simple
                                                      blame_tok: <escape_sed_pattern>
                                                      more_env: []
                                                      words: [
                                                        {<escape_sed_pattern>}
                                                        {(DQ (${ Id.VSub_Name source))}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  right: <Id.Eof_RParen _>
                                                ) <')(.*'> <Id.Lit_BadBackslash '\\'> <2> <Id.Lit_BadBackslash '\\'> <'s*)'> 
                                                (word_part.EscapedLiteral
                                                  token: <Id.Lit_EscapedChar '\\$'>
                                                  ch: '$'
                                                )
                                              )
                                            }
                                            {
                                              (DQ <Id.Lit_BadBackslash '\\'> <1> 
                                                <Id.Lit_BadBackslash '\\'> <2> 
                                                (CommandSub
                                                  left_token: <Id.Left_DollarParen '$('>
                                                  child: 
                                                    (command.Simple
                                                      blame_tok: <escape_sed_replacement>
                                                      more_env: []
                                                      words: [
                                                        {<escape_sed_replacement>}
                                                        {(DQ (${ Id.VSub_Name value))}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  right: <Id.Eof_RParen _>
                                                ) <Id.Lit_BadBackslash '\\'> <4>
                                              )
                                            }
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      ]
                                      right: <Id.Op_DSemi _>
                                    )
                                    (CaseArm
                                      left: <static>
                                      pattern: (pat.Words words:[{<static>}])
                                      middle: <Id.Right_CasePat _>
                                      action: [
                                        (command.Simple
                                          blame_tok: <printf>
                                          more_env: []
                                          words: [
                                            {<printf>}
                                            {(DQ <'s#%s#%s#g; '>)}
                                            {
                                              (DQ <'^('> <Id.Lit_BadBackslash '\\'> <'s*)'> 
                                                <Id.Lit_BadBackslash '\\'> <.> <Id.Lit_BadBackslash '\\'> <'s+(['> <Id.Lit_BadBackslash '\\'> <'\''> 
                                                (word_part.EscapedLiteral
                                                  token: <Id.Lit_EscapedChar '\\"'>
                                                  ch: '"'
                                                ) <']?)('> 
                                                (CommandSub
                                                  left_token: <Id.Left_DollarParen '$('>
                                                  child: 
                                                    (command.Simple
                                                      blame_tok: <glob_to_sed>
                                                      more_env: []
                                                      words: [
                                                        {<glob_to_sed>}
                                                        {(${ Id.VSub_Name source)}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  right: <Id.Eof_RParen _>
                                                ) <')'> <Id.Lit_BadBackslash '\\'> <2> <Id.Lit_BadBackslash '\\'> <'s*'> <Id.Lit_Dollar '$'>
                                              )
                                            }
                                            {
                                              (DQ <K_SCRIPT_BUILD_INCLUDE> <Id.Lit_BadBackslash '\\'> 
                                                <1> <Id.Lit_BadBackslash '\\'> <3>
                                              )
                                            }
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      ]
                                      right: <Id.Op_DSemi _>
                                    )
                                  ]
                                  arms_end: <Id.KW_Esac esac>
                                  redirects: []
                                )
                              ]
                              right: <Id.KW_Done done>
                            )
                          redirects: []
                        )
                      ]
                      ops: [<Id.Op_Pipe _>]
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <glob_to_sed>
              name: glob_to_sed
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [{<local>} {<Id.Lit_VarLike 'pattern='> (DQ )}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [{<local>} {<Id.Lit_VarLike 'sep='> (DQ <'|'>)}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <k_log_debug>
                      more_env: []
                      words: [
                        {<k_log_debug>}
                        {(DQ <'Converting glob pattern to sed: \''> ($ Id.VSub_At '@') <'\''>)}
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.ForEach
                      keyword: <Id.KW_For for>
                      iter_names: [file]
                      iterable: (for_iter.Words words:[{(DQ ($ Id.VSub_At '@'))}])
                      semi_tok: <Id.Op_Semi _>
                      body: 
                        (command.DoGroup
                          left: <Id.KW_Do do>
                          children: [
                            (command.Simple
                              blame_tok: <k_log_debug>
                              more_env: []
                              words: [
                                {<k_log_debug>}
                                {(DQ <'Checking file exists: \''> (${ Id.VSub_Name file) <'\''>)}
                              ]
                              redirects: []
                              do_fork: T
                            )
                            (command.If
                              if_kw: <Id.KW_If if>
                              arms: [
                                (IfArm
                                  keyword: <Id.KW_If if>
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (command.Simple
                                              blame_tok: <Id.Lit_LBracket '['>
                                              more_env: []
                                              words: [
                                                {<Id.Lit_LBracket '['>}
                                                {<-e>}
                                                {(DQ (${ Id.VSub_Name file))}
                                                {<Id.Lit_RBracket ']'>}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  then_kw: <Id.KW_Then then>
                                  action: [
                                    (command.ShAssignment
                                      left: <Id.Lit_VarLike 'pattern='>
                                      pairs: [
                                        (AssignPair
                                          left: <Id.Lit_VarLike 'pattern='>
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'pattern='>
                                              name: pattern
                                            )
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ (${ Id.VSub_Name pattern) 
                                                (CommandSub
                                                  left_token: <Id.Left_DollarParen '$('>
                                                  child: 
                                                    (command.Simple
                                                      blame_tok: <escape_sed_pattern>
                                                      more_env: []
                                                      words: [
                                                        {<escape_sed_pattern>}
                                                        {(DQ (${ Id.VSub_Name file))}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  right: <Id.Eof_RParen _>
                                                ) (${ Id.VSub_Name sep)
                                              )
                                            }
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                  spids: [869 884]
                                )
                              ]
                              else_action: []
                              fi_kw: <Id.KW_Fi fi>
                              redirects: []
                            )
                          ]
                          right: <Id.KW_Done done>
                        )
                      redirects: []
                    )
                    (command.Simple
                      blame_tok: <printf>
                      more_env: []
                      words: [
                        {<printf>}
                        {(DQ <'%s'>)}
                        {
                          (DQ 
                            (BracedVarSub
                              left: <Id.Left_DollarBrace '${'>
                              token: <Id.VSub_Name pattern>
                              var_name: pattern
                              suffix_op: 
                                (suffix_op.Unary
                                  op: <Id.VOp1_Percent '%'>
                                  arg_word: {(${ Id.VSub_Name sep)}
                                )
                              right: <Id.Right_DollarBrace '}'>
                            )
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <escape_sed_pattern>
              name: escape_sed_pattern
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Pipeline
                      children: [
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [{<echo>} {(DQ (${ Id.VSub_Number 1))}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <sed>
                          more_env: []
                          words: [{<sed>} {<-e>} {(SQ <'s/[]\\/$*.^\\|[()?+{}]/\\\\&/g'>)}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_Pipe _>]
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <escape_sed_replacement>
              name: escape_sed_replacement
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [
                        {<local>}
                        {<Id.Lit_VarLike 'delimiter='> 
                          (DQ 
                            (BracedVarSub
                              left: <Id.Left_DollarBrace '${'>
                              token: <Id.VSub_Number 2>
                              var_name: 2
                              suffix_op: 
                                (suffix_op.Unary
                                  op: <Id.VTest_ColonHyphen _>
                                  arg_word: {<Id.Lit_Slash '/'>}
                                )
                              right: <Id.Right_DollarBrace '}'>
                            )
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      blame_tok: <Id.Lit_LBracket '['>
                                      more_env: []
                                      words: [
                                        {<Id.Lit_LBracket '['>}
                                        {
                                          (BracedVarSub
                                            left: <Id.Left_DollarBrace '${'>
                                            token: <Id.VSub_Name delimiter>
                                            var_name: delimiter
                                            prefix_op: <Id.VSub_Pound '#'>
                                            right: <Id.Right_DollarBrace '}'>
                                          )
                                        }
                                        {<-ne>}
                                        {<1>}
                                        {<Id.Lit_RBracket ']'>}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.Simple
                              blame_tok: <k_log_alert>
                              more_env: []
                              words: [
                                {<k_log_alert>}
                                {
                                  (DQ <'Error, pattern delimiter must be exactly one character: '> 
                                    (${ Id.VSub_Name delimiter)
                                  )
                                }
                              ]
                              redirects: []
                              do_fork: T
                            )
                            (command.ControlFlow
                              keyword: <Id.ControlFlow_Return return>
                              arg_word: {<2>}
                            )
                          ]
                          spids: [985 1001]
                        )
                      ]
                      else_action: []
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                    (command.Pipeline
                      children: [
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [{<echo>} {(DQ (${ Id.VSub_Number 1))}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <sed>
                          more_env: []
                          words: [
                            {<sed>}
                            {<-e>}
                            {
                              (DQ <'s/['> 
                                (word_part.EscapedLiteral
                                  token: <Id.Lit_EscapedChar '\\\\'>
                                  ch: '\\'
                                ) (${ Id.VSub_Name delimiter) <Id.Lit_BadBackslash '\\'> <'&]/'> 
                                (word_part.EscapedLiteral
                                  token: <Id.Lit_EscapedChar '\\\\'>
                                  ch: '\\'
                                ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'> ch:'\\') <'&/g'>
                              )
                            }
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_Pipe _>]
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <process_stream>
              name: process_stream
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [{<local>} {<Id.Lit_VarLike 'pattern='> (DQ ($ Id.VSub_Number 1))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [
                        {<local>}
                        {<Id.Lit_VarLike 'parentPrefix='> 
                          (DQ 
                            (BracedVarSub
                              left: <Id.Left_DollarBrace '${'>
                              token: <Id.VSub_Number 2>
                              var_name: 2
                              suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:(rhs_word__Empty))
                              right: <Id.Right_DollarBrace '}'>
                            )
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      blame_tok: <Id.Lit_LBracket '['>
                                      more_env: []
                                      words: [
                                        {<Id.Lit_LBracket '['>}
                                        {($ Id.VSub_Pound '#')}
                                        {<-ge>}
                                        {<2>}
                                        {<Id.Lit_RBracket ']'>}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>} {<2>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          spids: [1082 1095]
                        )
                      ]
                      else_kw: <Id.KW_Else else>
                      else_action: [
                        (command.Simple
                          blame_tok: <shift>
                          more_env: []
                          words: [{<shift>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [{<local>} {<Id.Lit_VarLike 'sedOpts='> (DQ ($ Id.VSub_Star '*'))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <local>
                      more_env: []
                      words: [
                        {<local>}
                        {<Id.Lit_VarLike 'defPattern='> 
                          (DQ 
                            (CommandSub
                              left_token: <Id.Left_DollarParen '$('>
                              child: 
                                (command.Simple
                                  blame_tok: <get_definition_pattern>
                                  more_env: []
                                  words: [{<get_definition_pattern>}]
                                  redirects: []
                                  do_fork: T
                                )
                              right: <Id.Eof_RParen _>
                            )
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <k_log_debug>
                      more_env: []
                      words: [
                        {<k_log_debug>}
                        {
                          (DQ <'Processing stream using pattern: \''> (${ Id.VSub_Name pattern) 
                            <'\', definition pattern: \''> (${ Id.VSub_Name defPattern) <'\''>
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.Pipeline
                      children: [
                        (command.Simple
                          blame_tok: <sed>
                          more_env: []
                          words: [
                            {<sed>}
                            {<-E>}
                            {(${ Id.VSub_Name sedOpts)}
                            {<-e>}
                            {(DQ (${ Id.VSub_Name FIX_NEWLINES))}
                            {<-e>}
                            {(DQ (${ Id.VSub_Name defPattern))}
                            {<-e>}
                            {(DQ <'s/^/'> (${ Id.VSub_Name parentPrefix) <'/g'>)}
                            {<-e>}
                            {(DQ (${ Id.VSub_Name pattern))}
                          ]
                          redirects: []
                          do_fork: T
                        )
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      blame_tok: <read>
                                      more_env: [(EnvPair left:<Id.Lit_VarLike 'IFS='> name:IFS val:(rhs_word__Empty))]
                                      words: [{<read>} {<-r>} {<line>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          body: 
                            (command.DoGroup
                              left: <Id.KW_Do do>
                              children: [
                                (command.Simple
                                  blame_tok: <local>
                                  more_env: []
                                  words: [
                                    {<local>}
                                    {<Id.Lit_VarLike 'prefix='> (DQ (${ Id.VSub_Name parentPrefix))}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                                (command.Simple
                                  blame_tok: <local>
                                  more_env: []
                                  words: [{<local>} {<Id.Lit_VarLike 'includeFile='> (DQ )}]
                                  redirects: []
                                  do_fork: T
                                )
                                (command.Case
                                  case_kw: <Id.KW_Case case>
                                  to_match: (case_arg.Word w:{(DQ (${ Id.VSub_Name line))})
                                  arms_start: <Id.KW_In in>
                                  arms: [
                                    (CaseArm
                                      left: <Id.Op_LParen _>
                                      pattern: 
                                        (pat.Words
                                          words: [{<K_SCRIPT_BUILD_INCLUDE> <Id.Lit_Star '*'>}]
                                        )
                                      middle: <Id.Right_CasePat _>
                                      action: [
                                        (command.Simple
                                          blame_tok: <k_log_debug>
                                          more_env: []
                                          words: [
                                            {<k_log_debug>}
                                            {
                                              (DQ <'Processing \'include\' line: \''> 
                                                (${ Id.VSub_Name line)
                                              )
                                            }
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                        (command.ShAssignment
                                          left: <Id.Lit_VarLike 'line='>
                                          pairs: [
                                            (AssignPair
                                              left: <Id.Lit_VarLike 'line='>
                                              lhs: 
                                                (sh_lhs_expr.Name
                                                  left: <Id.Lit_VarLike 'line='>
                                                  name: line
                                                )
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (DQ 
                                                    (CommandSub
                                                      left_token: <Id.Left_DollarParen '$('>
                                                      child: 
                                                        (command.Simple
                                                          blame_tok: <k_string_remove_start>
                                                          more_env: []
                                                          words: [
                                                            {<k_string_remove_start>}
                                                            {(DQ <K_SCRIPT_BUILD_INCLUDE>)}
                                                            {(DQ (${ Id.VSub_Name line))}
                                                          ]
                                                          redirects: []
                                                          do_fork: T
                                                        )
                                                      right: <Id.Eof_RParen _>
                                                    )
                                                  )
                                                }
                                            )
                                          ]
                                          redirects: []
                                        )
                                        (command.ShAssignment
                                          left: <Id.Lit_VarLike 'trimmed='>
                                          pairs: [
                                            (AssignPair
                                              left: <Id.Lit_VarLike 'trimmed='>
                                              lhs: 
                                                (sh_lhs_expr.Name
                                                  left: <Id.Lit_VarLike 'trimmed='>
                                                  name: trimmed
                                                )
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (DQ 
                                                    (CommandSub
                                                      left_token: <Id.Left_DollarParen '$('>
                                                      child: 
                                                        (command.Simple
                                                          blame_tok: <k_string_trim>
                                                          more_env: []
                                                          words: [
                                                            {<k_string_trim>}
                                                            {(DQ (${ Id.VSub_Name line))}
                                                          ]
                                                          redirects: []
                                                          do_fork: T
                                                        )
                                                      right: <Id.Eof_RParen _>
                                                    )
                                                  )
                                                }
                                            )
                                          ]
                                          redirects: []
                                        )
                                        (command.ShAssignment
                                          left: <Id.Lit_VarLike 'prefix='>
                                          pairs: [
                                            (AssignPair
                                              left: <Id.Lit_VarLike 'prefix='>
                                              lhs: 
                                                (sh_lhs_expr.Name
                                                  left: <Id.Lit_VarLike 'prefix='>
                                                  name: prefix
                                                )
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (DQ (${ Id.VSub_Name prefix) 
                                                    (CommandSub
                                                      left_token: <Id.Left_DollarParen '$('>
                                                      child: 
                                                        (command.Simple
                                                          blame_tok: <k_string_remove_end>
                                                          more_env: []
                                                          words: [
                                                            {<k_string_remove_end>}
                                                            {(DQ (${ Id.VSub_Name trimmed))}
                                                            {(DQ (${ Id.VSub_Name line))}
                                                          ]
                                                          redirects: []
                                                          do_fork: T
                                                        )
                                                      right: <Id.Eof_RParen _>
                                                    )
                                                  )
                                                }
                                            )
                                          ]
                                          redirects: []
                                        )
                                        (command.ShAssignment
                                          left: <Id.Lit_VarLike 'includeFile='>
                                          pairs: [
                                            (AssignPair
                                              left: <Id.Lit_VarLike 'includeFile='>
                                              lhs: 
                                                (sh_lhs_expr.Name
                                                  left: <Id.Lit_VarLike 'includeFile='>
                                                  name: includeFile
                                                )
                                              op: assign_op.Equal
                                              rhs: {(DQ (${ Id.VSub_Name trimmed))}
                                            )
                                          ]
                                          redirects: []
                                        )
                                      ]
                                      right: <Id.Op_DSemi _>
                                    )
                                    (CaseArm
                                      left: <Id.Op_LParen _>
                                      pattern: 
                                        (pat.Words
                                          words: [{<K_SCRIPT_BUILD_REPORT> <Id.Lit_Star '*'>}]
                                        )
                                      middle: <Id.Right_CasePat _>
                                      action: [
                                        (command.Simple
                                          blame_tok: <k_log_debug>
                                          more_env: []
                                          words: [
                                            {<k_log_debug>}
                                            {
                                              (DQ <'Processing \'report\' line: \''> 
                                                (${ Id.VSub_Name line)
                                              )
                                            }
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                        (command.ShAssignment
                                          left: <Id.Lit_VarLike 'line='>
                                          pairs: [
                                            (AssignPair
                                              left: <Id.Lit_VarLike 'line='>
                                              lhs: 
                                                (sh_lhs_expr.Name
                                                  left: <Id.Lit_VarLike 'line='>
                                                  name: line
                                                )
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (DQ 
                                                    (CommandSub
                                                      left_token: <Id.Left_DollarParen '$('>
                                                      child: 
                                                        (command.Simple
                                                          blame_tok: <k_string_remove_start>
                                                          more_env: []
                                                          words: [
                                                            {<k_string_remove_start>}
                                                            {(DQ <K_SCRIPT_BUILD_REPORT>)}
                                                            {(DQ (${ Id.VSub_Name line))}
                                                          ]
                                                          redirects: []
                                                          do_fork: T
                                                        )
                                                      right: <Id.Eof_RParen _>
                                                    )
                                                  )
                                                }
                                            )
                                          ]
                                          redirects: []
                                        )
                                        (command.Simple
                                          blame_tok: <printf>
                                          more_env: []
                                          words: [
                                            {<printf>}
                                            {(DQ <'%s'> <Id.Lit_BadBackslash '\\'> <n>)}
                                            {(DQ (${ Id.VSub_Name line))}
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      ]
                                      right: <Id.Op_DSemi _>
                                    )
                                  ]
                                  arms_end: <Id.KW_Esac esac>
                                  redirects: []
                                )
                                (command.If
                                  if_kw: <Id.KW_If if>
                                  arms: [
                                    (IfArm
                                      keyword: <Id.KW_If if>
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (command.Sentence
                                              child: 
                                                (command.AndOr
                                                  children: [
                                                    (command.Simple
                                                      blame_tok: <Id.Lit_LBracket '['>
                                                      more_env: []
                                                      words: [
                                                        {<Id.Lit_LBracket '['>}
                                                        {<-n>}
                                                        {(DQ (${ Id.VSub_Name includeFile))}
                                                        {<Id.Lit_RBracket ']'>}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                    (command.Simple
                                                      blame_tok: <Id.Lit_LBracket '['>
                                                      more_env: []
                                                      words: [
                                                        {<Id.Lit_LBracket '['>}
                                                        {<-f>}
                                                        {(DQ (${ Id.VSub_Name includeFile))}
                                                        {<Id.Lit_RBracket ']'>}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  ]
                                                  ops: [<Id.Op_DAmp _>]
                                                )
                                              terminator: <Id.Op_Semi _>
                                            )
                                          ]
                                        )
                                      then_kw: <Id.KW_Then then>
                                      action: [
                                        (command.Simple
                                          blame_tok: <k_log_debug>
                                          more_env: []
                                          words: [
                                            {<k_log_debug>}
                                            {
                                              (DQ <'Including file: \''> (${ Id.VSub_Name includeFile) 
                                                <'\''>
                                              )
                                            }
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                        (command.Simple
                                          blame_tok: <printf>
                                          more_env: []
                                          words: [
                                            {<printf>}
                                            {
                                              (DQ (${ Id.VSub_Name prefix) 
                                                <'#K_SCRIPT_BUILD: include(%s)'> <Id.Lit_BadBackslash '\\'> <n>
                                              )
                                            }
                                            {(DQ (${ Id.VSub_Name includeFile))}
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                        (command.Simple
                                          blame_tok: <process_stream>
                                          more_env: []
                                          words: [
                                            {<process_stream>}
                                            {(DQ (${ Id.VSub_Name pattern))}
                                            {(DQ (${ Id.VSub_Name prefix))}
                                            {(${ Id.VSub_Name sedOpts)}
                                          ]
                                          redirects: [
                                            (Redir
                                              op: <Id.Redir_Less '<'>
                                              loc: (redir_loc.Fd fd:0)
                                              arg: {(DQ (${ Id.VSub_Name includeFile))}
                                            )
                                          ]
                                          do_fork: T
                                        )
                                      ]
                                      spids: [1374 1403]
                                    )
                                  ]
                                  else_kw: <Id.KW_Else else>
                                  else_action: [
                                    (command.Simple
                                      blame_tok: <k_log_debug>
                                      more_env: []
                                      words: [
                                        {<k_log_debug>}
                                        {(DQ <'Regular line: \''> (${ Id.VSub_Name line) <'\''>)}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <printf>
                                      more_env: []
                                      words: [
                                        {<printf>}
                                        {(DQ <'%s'> <Id.Lit_BadBackslash '\\'> <n>)}
                                        {(DQ (${ Id.VSub_Name line))}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  fi_kw: <Id.KW_Fi fi>
                                  redirects: []
                                )
                              ]
                              right: <Id.KW_Done done>
                            )
                          redirects: []
                        )
                      ]
                      ops: [<Id.Op_Pipe _>]
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <handle_changedir>
              name: handle_changedir
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      blame_tok: <Id.Lit_LBracket '['>
                                      more_env: []
                                      words: [
                                        {<Id.Lit_LBracket '['>}
                                        {(${ Id.VSub_Name changeDir)}
                                        {<Id.Lit_Equals '='>}
                                        {<true>}
                                        {<Id.Lit_RBracket ']'>}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.If
                              if_kw: <Id.KW_If if>
                              arms: [
                                (IfArm
                                  keyword: <Id.KW_If if>
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (command.Simple
                                              blame_tok: <Id.Lit_LBracket '['>
                                              more_env: []
                                              words: [
                                                {<Id.Lit_LBracket '['>}
                                                {<-z>}
                                                {(DQ (${ Id.VSub_Name changeDirPath))}
                                                {<Id.Lit_RBracket ']'>}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  then_kw: <Id.KW_Then then>
                                  action: [
                                    (command.If
                                      if_kw: <Id.KW_If if>
                                      arms: [
                                        (IfArm
                                          keyword: <Id.KW_If if>
                                          cond: 
                                            (condition.Shell
                                              commands: [
                                                (command.Sentence
                                                  child: 
                                                    (command.Simple
                                                      blame_tok: <Id.Lit_LBracket '['>
                                                      more_env: []
                                                      words: [
                                                        {<Id.Lit_LBracket '['>}
                                                        {<-f>}
                                                        {(DQ (${ Id.VSub_Name infile))}
                                                        {<Id.Lit_RBracket ']'>}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  terminator: <Id.Op_Semi _>
                                                )
                                              ]
                                            )
                                          then_kw: <Id.KW_Then then>
                                          action: [
                                            (command.ShAssignment
                                              left: <Id.Lit_VarLike 'changeDirPath='>
                                              pairs: [
                                                (AssignPair
                                                  left: <Id.Lit_VarLike 'changeDirPath='>
                                                  lhs: 
                                                    (sh_lhs_expr.Name
                                                      left: <Id.Lit_VarLike 'changeDirPath='>
                                                      name: changeDirPath
                                                    )
                                                  op: assign_op.Equal
                                                  rhs: 
                                                    {
                                                      (DQ 
                                                        (CommandSub
                                                          left_token: <Id.Left_DollarParen '$('>
                                                          child: 
                                                            (command.Simple
                                                              blame_tok: <k_fs_dirname>
                                                              more_env: []
                                                              words: [
                                                                {<k_fs_dirname>}
                                                                {(DQ (${ Id.VSub_Name infile))}
                                                              ]
                                                              redirects: []
                                                              do_fork: T
                                                            )
                                                          right: <Id.Eof_RParen _>
                                                        )
                                                      )
                                                    }
                                                )
                                              ]
                                              redirects: []
                                            )
                                          ]
                                          spids: [1544 1559]
                                        )
                                      ]
                                      else_kw: <Id.KW_Else else>
                                      else_action: [
                                        (command.Simple
                                          blame_tok: <k_log_err>
                                          more_env: []
                                          words: [
                                            {<k_log_err>}
                                            {
                                              (DQ 
                                                <
'No directory given to -c/--cd and no -f/--file specified'
                                                >
                                              )
                                            }
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                        (command.ControlFlow
                                          keyword: <Id.ControlFlow_Return return>
                                          arg_word: {<2>}
                                        )
                                      ]
                                      fi_kw: <Id.KW_Fi fi>
                                      redirects: []
                                    )
                                  ]
                                  spids: [1526 1541]
                                )
                              ]
                              else_action: []
                              fi_kw: <Id.KW_Fi fi>
                              redirects: []
                            )
                            (command.If
                              if_kw: <Id.KW_If if>
                              arms: [
                                (IfArm
                                  keyword: <Id.KW_If if>
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (command.Simple
                                              blame_tok: <Id.Lit_LBracket '['>
                                              more_env: []
                                              words: [
                                                {<Id.Lit_LBracket '['>}
                                                {<-f>}
                                                {(DQ (${ Id.VSub_Name infile))}
                                                {<Id.Lit_RBracket ']'>}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  then_kw: <Id.KW_Then then>
                                  action: [
                                    (command.ShAssignment
                                      left: <Id.Lit_VarLike 'infile='>
                                      pairs: [
                                        (AssignPair
                                          left: <Id.Lit_VarLike 'infile='>
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'infile='>
                                              name: infile
                                            )
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ 
                                                (CommandSub
                                                  left_token: <Id.Left_DollarParen '$('>
                                                  child: 
                                                    (command.Simple
                                                      blame_tok: <k_fs_resolve>
                                                      more_env: []
                                                      words: [
                                                        {<k_fs_resolve>}
                                                        {(DQ (${ Id.VSub_Name infile))}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  right: <Id.Eof_RParen _>
                                                )
                                              )
                                            }
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                  spids: [1599 1614]
                                )
                              ]
                              else_action: []
                              fi_kw: <Id.KW_Fi fi>
                              redirects: []
                            )
                            (command.If
                              if_kw: <Id.KW_If if>
                              arms: [
                                (IfArm
                                  keyword: <Id.KW_If if>
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (command.Simple
                                              blame_tok: <Id.Lit_LBracket '['>
                                              more_env: []
                                              words: [
                                                {<Id.Lit_LBracket '['>}
                                                {<-n>}
                                                {(DQ (${ Id.VSub_Name outfile))}
                                                {<Id.Lit_RBracket ']'>}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  then_kw: <Id.KW_Then then>
                                  action: [
                                    (command.ShAssignment
                                      left: <Id.Lit_VarLike 'outfile='>
                                      pairs: [
                                        (AssignPair
                                          left: <Id.Lit_VarLike 'outfile='>
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'outfile='>
                                              name: outfile
                                            )
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ 
                                                (CommandSub
                                                  left_token: <Id.Left_DollarParen '$('>
                                                  child: 
                                                    (command.Simple
                                                      blame_tok: <k_fs_resolve>
                                                      more_env: []
                                                      words: [
                                                        {<k_fs_resolve>}
                                                        {(DQ (${ Id.VSub_Name outfile))}
                                                      ]
                                                      redirects: []
                                                      do_fork: T
                                                    )
                                                  right: <Id.Eof_RParen _>
                                                )
                                              )
                                            }
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                  spids: [1635 1650]
                                )
                              ]
                              else_action: []
                              fi_kw: <Id.KW_Fi fi>
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <cd>
                              more_env: []
                              words: [{<cd>} {(DQ (${ Id.VSub_Name changeDirPath))}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          spids: [1508 1523]
                        )
                      ]
                      else_action: []
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <handle_executable>
              name: handle_executable
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      blame_tok: <Id.Lit_LBracket '['>
                                      more_env: []
                                      words: [
                                        {<Id.Lit_LBracket '['>}
                                        {(${ Id.VSub_Name executable)}
                                        {<Id.Lit_Equals '='>}
                                        {<true>}
                                        {<Id.Lit_RBracket ']'>}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.If
                              if_kw: <Id.KW_If if>
                              arms: [
                                (IfArm
                                  keyword: <Id.KW_If if>
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (command.Simple
                                              blame_tok: <Id.Lit_LBracket '['>
                                              more_env: []
                                              words: [
                                                {<Id.Lit_LBracket '['>}
                                                {<-f>}
                                                {(DQ (${ Id.VSub_Name outfile))}
                                                {<Id.Lit_RBracket ']'>}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  then_kw: <Id.KW_Then then>
                                  action: [
                                    (command.Simple
                                      blame_tok: <chmod>
                                      more_env: []
                                      words: [
                                        {<chmod>}
                                        {<Id.Lit_Other '+'> <x>}
                                        {(DQ (${ Id.VSub_Name outfile))}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  spids: [1712 1727]
                                )
                              ]
                              else_kw: <Id.KW_Else else>
                              else_action: [
                                (command.Simple
                                  blame_tok: <k_log_err>
                                  more_env: []
                                  words: [
                                    {<k_log_err>}
                                    {(DQ <'Cannot set executable bit when output is stdout'>)}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                                (command.ControlFlow
                                  keyword: <Id.ControlFlow_Return return>
                                  arg_word: {<2>}
                                )
                              ]
                              fi_kw: <Id.KW_Fi fi>
                              redirects: []
                            )
                          ]
                          spids: [1694 1709]
                        )
                      ]
                      else_action: []
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<tmpVal>}]
              redirects: []
              do_fork: T
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          blame_tok: <Id.Lit_LBracket '['>
                          more_env: []
                          words: [
                            {<Id.Lit_LBracket '['>}
                            {($ Id.VSub_Pound '#')}
                            {<-gt>}
                            {<0>}
                            {<Id.Lit_RBracket ']'>}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.Case
                      case_kw: <Id.KW_Case case>
                      to_match: (case_arg.Word w:{(DQ ($ Id.VSub_Number 1))})
                      arms_start: <Id.KW_In in>
                      arms: [
                        (CaseArm
                          left: <-h>
                          pattern: (pat.Words words:[{<-h>} {<--help>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.Simple
                              blame_tok: <k_usage>
                              more_env: []
                              words: [{<k_usage>}]
                              redirects: []
                              do_fork: T
                            )
                            (command.ControlFlow
                              keyword: <Id.ControlFlow_Exit exit>
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-c>
                          pattern: (pat.Words words:[{<-c>} {<--cd>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'changeDir='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'changeDir='>
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'changeDir='>
                                      name: changeDir
                                    )
                                  op: assign_op.Equal
                                  rhs: {<true>}
                                )
                              ]
                              redirects: []
                            )
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'changeDirPath='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'changeDirPath='>
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'changeDirPath='>
                                      name: changeDirPath
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (CommandSub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Simple
                                              blame_tok: <k_option_optional_arg>
                                              more_env: []
                                              words: [
                                                {<k_option_optional_arg>}
                                                {(DQ ($ Id.VSub_At '@'))}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          right: <Id.Eof_RParen _>
                                        )
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                            (command.If
                              if_kw: <Id.KW_If if>
                              arms: [
                                (IfArm
                                  keyword: <Id.KW_If if>
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (command.Simple
                                              blame_tok: <Id.Lit_LBracket '['>
                                              more_env: []
                                              words: [
                                                {<Id.Lit_LBracket '['>}
                                                {<-n>}
                                                {(DQ (${ Id.VSub_Name changeDirPath))}
                                                {<Id.Lit_RBracket ']'>}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  then_kw: <Id.KW_Then then>
                                  action: [
                                    (command.Simple
                                      blame_tok: <shift>
                                      more_env: []
                                      words: [{<shift>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  spids: [1836 1851]
                                )
                              ]
                              else_action: []
                              fi_kw: <Id.KW_Fi fi>
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-f>
                          pattern: (pat.Words words:[{<-f>} {<--file>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'infile='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'infile='>
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'infile='> name:infile)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (CommandSub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Simple
                                              blame_tok: <k_option_requires_arg>
                                              more_env: []
                                              words: [
                                                {<k_option_requires_arg>}
                                                {(DQ ($ Id.VSub_At '@'))}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          right: <Id.Eof_RParen _>
                                        )
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>} {<2>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-d>
                          pattern: (pat.Words words:[{<-d>} {<--define>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'tmpVal='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'tmpVal='>
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tmpVal='> name:tmpVal)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (CommandSub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Simple
                                              blame_tok: <k_option_requires_arg>
                                              more_env: []
                                              words: [
                                                {<k_option_requires_arg>}
                                                {(DQ ($ Id.VSub_At '@'))}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          right: <Id.Eof_RParen _>
                                        )
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <add_definition>
                              more_env: []
                              words: [
                                {<add_definition>}
                                {
                                  (DQ 
                                    (CommandSub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (command.Simple
                                              blame_tok: <echo>
                                              more_env: []
                                              words: [{<echo>} {(DQ (${ Id.VSub_Name tmpVal))}]
                                              redirects: []
                                              do_fork: T
                                            )
                                            (command.Simple
                                              blame_tok: <cut>
                                              more_env: []
                                              words: [{<cut>} {<-d>} {<Id.Lit_Equals '='>} {<-f>} {<1>}]
                                              redirects: []
                                              do_fork: T
                                            )
                                          ]
                                          ops: [<Id.Op_Pipe _>]
                                        )
                                      right: <Id.Eof_RParen _>
                                    )
                                  )
                                }
                                {
                                  (DQ 
                                    (CommandSub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (command.Simple
                                              blame_tok: <echo>
                                              more_env: []
                                              words: [{<echo>} {(DQ (${ Id.VSub_Name tmpVal))}]
                                              redirects: []
                                              do_fork: T
                                            )
                                            (command.Simple
                                              blame_tok: <cut>
                                              more_env: []
                                              words: [{<cut>} {<-d>} {<Id.Lit_Equals '='>} {<-f>} {<2>}]
                                              redirects: []
                                              do_fork: T
                                            )
                                          ]
                                          ops: [<Id.Op_Pipe _>]
                                        )
                                      right: <Id.Eof_RParen _>
                                    )
                                  )
                                }
                              ]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>} {<2>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-o>
                          pattern: (pat.Words words:[{<-o>} {<--output>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'outfile='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'outfile='>
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'outfile='>
                                      name: outfile
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (CommandSub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Simple
                                              blame_tok: <k_option_requires_arg>
                                              more_env: []
                                              words: [
                                                {<k_option_requires_arg>}
                                                {(DQ ($ Id.VSub_At '@'))}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          right: <Id.Eof_RParen _>
                                        )
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>} {<2>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-i>
                          pattern: (pat.Words words:[{<-i>} {<--inline>} {<--static>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'tmpVal='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'tmpVal='>
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tmpVal='> name:tmpVal)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (CommandSub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Simple
                                              blame_tok: <k_option_optional_arg>
                                              more_env: []
                                              words: [
                                                {<k_option_optional_arg>}
                                                {(DQ ($ Id.VSub_At '@'))}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          right: <Id.Eof_RParen _>
                                        )
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                            (command.If
                              if_kw: <Id.KW_If if>
                              arms: [
                                (IfArm
                                  keyword: <Id.KW_If if>
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (command.Simple
                                              blame_tok: <Id.Lit_LBracket '['>
                                              more_env: []
                                              words: [
                                                {<Id.Lit_LBracket '['>}
                                                {<-n>}
                                                {(DQ (${ Id.VSub_Name tmpVal))}
                                                {<Id.Lit_RBracket ']'>}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  then_kw: <Id.KW_Then then>
                                  action: [
                                    (command.Simple
                                      blame_tok: <add_static_path>
                                      more_env: []
                                      words: [{<add_static_path>} {(DQ (${ Id.VSub_Name tmpVal))}]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <shift>
                                      more_env: []
                                      words: [{<shift>} {<2>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  spids: [2020 2035]
                                )
                              ]
                              else_kw: <Id.KW_Else else>
                              else_action: [
                                (command.Simple
                                  blame_tok: <add_static_path>
                                  more_env: []
                                  words: [{<add_static_path>} {(DQ <'./*'>)}]
                                  redirects: []
                                  do_fork: T
                                )
                                (command.Simple
                                  blame_tok: <shift>
                                  more_env: []
                                  words: [{<shift>}]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              fi_kw: <Id.KW_Fi fi>
                              redirects: []
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-l>
                          pattern: (pat.Words words:[{<-l>} {<--link>} {<--dynamic>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'tmpVal='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'tmpVal='>
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tmpVal='> name:tmpVal)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (CommandSub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Simple
                                              blame_tok: <k_option_requires_arg>
                                              more_env: []
                                              words: [
                                                {<k_option_requires_arg>}
                                                {(DQ ($ Id.VSub_At '@'))}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          right: <Id.Eof_RParen _>
                                        )
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <add_dynamic_mapping>
                              more_env: []
                              words: [
                                {<add_dynamic_mapping>}
                                {
                                  (DQ 
                                    (CommandSub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (command.Simple
                                              blame_tok: <echo>
                                              more_env: []
                                              words: [{<echo>} {(DQ (${ Id.VSub_Name tmpVal))}]
                                              redirects: []
                                              do_fork: T
                                            )
                                            (command.Simple
                                              blame_tok: <cut>
                                              more_env: []
                                              words: [{<cut>} {<-d>} {<Id.Lit_Equals '='>} {<-f>} {<1>}]
                                              redirects: []
                                              do_fork: T
                                            )
                                          ]
                                          ops: [<Id.Op_Pipe _>]
                                        )
                                      right: <Id.Eof_RParen _>
                                    )
                                  )
                                }
                                {
                                  (DQ 
                                    (CommandSub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (command.Simple
                                              blame_tok: <echo>
                                              more_env: []
                                              words: [{<echo>} {(DQ (${ Id.VSub_Name tmpVal))}]
                                              redirects: []
                                              do_fork: T
                                            )
                                            (command.Simple
                                              blame_tok: <cut>
                                              more_env: []
                                              words: [{<cut>} {<-d>} {<Id.Lit_Equals '='>} {<-f>} {<2>}]
                                              redirects: []
                                              do_fork: T
                                            )
                                          ]
                                          ops: [<Id.Op_Pipe _>]
                                        )
                                      right: <Id.Eof_RParen _>
                                    )
                                  )
                                }
                              ]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>} {<2>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-r>
                          pattern: (pat.Words words:[{<-r>} {<--report>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'report='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'report='>
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'report='> name:report)
                                  op: assign_op.Equal
                                  rhs: {<true>}
                                )
                              ]
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-x>
                          pattern: (pat.Words words:[{<-x>} {<--exec>} {<--executable>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'executable='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'executable='>
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'executable='>
                                      name: executable
                                    )
                                  op: assign_op.Equal
                                  rhs: {<true>}
                                )
                              ]
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-v>
                          pattern: (pat.Words words:[{<-v>} {<--version>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.Simple
                              blame_tok: <k_version>
                              more_env: []
                              words: [{<k_version>}]
                              redirects: []
                              do_fork: T
                            )
                            (command.ControlFlow
                              keyword: <Id.ControlFlow_Exit exit>
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-V>
                          pattern: (pat.Words words:[{<-V>} {<--verbose>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.Simple
                              blame_tok: <k_log_level>
                              more_env: []
                              words: [{<k_log_level>} {(${ Id.VSub_Name KOALEPHANT_LOG_LEVEL_INFO)}]
                              redirects: [
                                (Redir
                                  op: <Id.Redir_Great '>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-D>
                          pattern: (pat.Words words:[{<-D>} {<--debug>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.Simple
                              blame_tok: <k_log_level>
                              more_env: []
                              words: [{<k_log_level>} {(${ Id.VSub_Name KOALEPHANT_LOG_LEVEL_DEBUG)}]
                              redirects: [
                                (Redir
                                  op: <Id.Redir_Great '>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-q>
                          pattern: (pat.Words words:[{<-q>} {<--quiet>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.Simple
                              blame_tok: <k_log_level>
                              more_env: []
                              words: [{<k_log_level>} {(${ Id.VSub_Name KOALEPHANT_LOG_LEVEL_ERR)}]
                              redirects: [
                                (Redir
                                  op: <Id.Redir_Great '>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <-->
                          pattern: (pat.Words words:[{<-->}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>}]
                              redirects: []
                              do_fork: T
                            )
                            (command.ControlFlow
                              keyword: <Id.ControlFlow_Break break>
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <->
                          pattern: (pat.Words words:[{<-> <Id.Lit_Star '*'>}])
                          middle: <Id.Right_CasePat _>
                          action: [
                            (command.Simple
                              blame_tok: <echo>
                              more_env: []
                              words: [{<echo>} {(DQ <'Unknown option: '> (${ Id.VSub_Number 1))}]
                              redirects: [
                                (Redir
                                  op: <Id.Redir_GreatAnd '>&'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<2>}
                                )
                              ]
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <k_usage>
                              more_env: []
                              words: [{<k_usage>}]
                              redirects: []
                              do_fork: T
                            )
                            (command.ControlFlow
                              keyword: <Id.ControlFlow_Exit exit>
                              arg_word: {<1>}
                            )
                          ]
                          right: <Id.Op_DSemi _>
                        )
                        (CaseArm
                          left: <Id.Lit_Star '*'>
                          pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                          middle: <Id.Right_CasePat _>
                          action: [(command.ControlFlow keyword:<Id.ControlFlow_Break break>)]
                          right: <Id.Op_DSemi _>
                        )
                      ]
                      arms_end: <Id.KW_Esac esac>
                      redirects: []
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
            (command.Simple
              blame_tok: <handle_changedir>
              more_env: []
              words: [{<handle_changedir>}]
              redirects: []
              do_fork: T
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {(${ Id.VSub_Name report)}
                                {<Id.Lit_Equals '='>}
                                {<true>}
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <process_stream>
                      more_env: []
                      words: [
                        {<process_stream>}
                        {(DQ (${ Id.VSub_Name FIND_SOURCE_LINES))}
                        {(DQ )}
                        {<-n>}
                      ]
                      redirects: [
                        (Redir
                          op: <Id.Redir_Less '<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {(DQ (${ Id.VSub_Name infile))}
                        )
                        (Redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {(DQ (${ Id.VSub_Name outfile))}
                        )
                      ]
                      do_fork: T
                    )
                    (command.ControlFlow keyword:<Id.ControlFlow_Return return>)
                  ]
                  spids: [2341 2356]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Simple
              blame_tok: <process_stream>
              more_env: []
              words: [
                {<process_stream>}
                {
                  (DQ 
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Simple
                          blame_tok: <get_include_pattern>
                          more_env: []
                          words: [{<get_include_pattern>}]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Eof_RParen _>
                    )
                  )
                }
              ]
              redirects: [
                (Redir
                  op: <Id.Redir_Less '<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: {(DQ (${ Id.VSub_Name infile))}
                )
                (Redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(DQ (${ Id.VSub_Name outfile))}
                )
              ]
              do_fork: T
            )
            (command.Simple
              blame_tok: <handle_executable>
              more_env: []
              words: [{<handle_executable>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <k_script_build>
      more_env: []
      words: [{<k_script_build>} {(DQ ($ Id.VSub_At '@'))}]
      redirects: []
      do_fork: T
    )
  ]
)