(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:OUTDIR) op:Equal rhs:{($ VSub_Number '$1')})]
    )
    (C {(shift)})
    (C {(trap)} {(DQ ('rm -f ') (${ VSub_Name OUTDIR) ('*.') ($ VSub_Dollar '$$') ('; exit 1'))} {(1)} 
      {(2)} {(15)}
    )
    (command.SimpleCommand
      words: [{(exec)}]
      redirects: [
        (redir.Redir
          op: <Redir_Great '3>'>
          fd: 3
          arg_word: {(${ VSub_Name OUTDIR) (incl.) ($ VSub_Dollar '$$')}
        )
        (redir.Redir
          op: <Redir_Great '4>'>
          fd: 4
          arg_word: {(${ VSub_Name OUTDIR) (smenu.) ($ VSub_Dollar '$$')}
        )
        (redir.Redir
          op: <Redir_Great '5>'>
          fd: 5
          arg_word: {(${ VSub_Name OUTDIR) (lmenu.) ($ VSub_Dollar '$$')}
        )
      ]
    )
    (command.FuncDef
      name: build_menu
      body: 
        (command.BraceGroup
          children: [
            (command.WhileUntil
              keyword: <KW_While while>
              cond: [
                (command.Sentence
                  child: 
                    (command.SimpleCommand
                      words: [{(read)} {(file)} {(node)}]
                      more_env: [(env_pair name:IFS val:{(Lit_Other ':')})]
                    )
                  terminator: <Op_Semi ';'>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.SimpleCommand
                      words: [{(echo)} {(DQ ('@include ') ($ VSub_DollarName '$file'))}]
                      redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(3)})]
                    )
                    (command.SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('* ') ($ VSub_DollarName '$node') (':: ') 
                            (word_part.CommandSubPart
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(sed)} {(-n)} {(SQ <'s/^@c %MENU% //p'>)} 
                                      {($ VSub_DollarName '$file')}
                                    )
                                  ]
                                )
                              left_token: <Left_Backtick '`'>
                            )
                          )
                        }
                      ]
                      redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(4)})]
                    )
                    (command.SimpleCommand
                      words: [
                        {($ VSub_DollarName '$AWK')}
                        {
                          (SQ <'BEGIN { do_menu = 0 }\n'> 
                            <'\t  /^@node / { sub(/^@node /, ""); sub(/,.*$/, ""); node = $0 }\n'> <'\t  /^@menu/ { printf "\\n%s\\n\\n", node; do_menu = 1; next }\n'> 
                            <'\t  /^@end menu/ { do_menu = 0 }\n'> <'\t  do_menu { print }'>
                          )
                        }
                        {($ VSub_DollarName '$file')}
                      ]
                      redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(5)})]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.FuncDef
      name: collect_nodes
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {(egrep)} {(SQ <'^(@c )?@node.*Top'>)} {(DQ ($ VSub_At '$@'))} {(/dev/null)})
                (C {(cut)} {(-d) (Lit_Comma ',')} {(-f-2)})
                (C {(sed)} {(SQ <'s/@c //; s/, /:/; s/:@node /:/; s/ /_/g; s/:/ /g'>)})
                (C {($ VSub_DollarName '$AWK')} 
                  {
                    (SQ <'{ file[$2] = $1; nnode[$2] = $3 }\n'> <'\tEND  { for (x in file)\n'> 
                      <'\t\t if (file[x] != "")\n'> <'\t\t   print file[x] ":" x, file[nnode[x]] ":" nnode[x] }'>
                    )
                  }
                )
                (C {($ VSub_DollarName '$AWK')} {(-f)} {(tsort.awk)})
                (C {(sed)} {(SQ <'s/_/ /g'>)})
              ]
              negated: F
            )
          ]
        )
    )
    (command.ForEach
      iter_name: addon
      iter_words: [{($ VSub_Number '$2')}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:addon)
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [(C {(basename)} {($ VSub_DollarName '$addon')} {(.texi)})]
                          )
                        left_token: <Left_Backtick '`'>
                      )
                    }
                )
              ]
            )
            (command.SimpleCommand
              words: [{(echo)} {(DQ ('@set ') ($ VSub_DollarName '$addon'))}]
              redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(3)})]
            )
          ]
        )
    )
    (command.Pipeline
      children: [(C {(collect_nodes)} {($ VSub_Number '$1')}) (C {(build_menu)})]
      negated: F
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Number '$2'))} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.BraceGroup
              children: [
                (command.Sentence child:(C {(echo)}) terminator:<Op_Semi ';'>)
                (command.Sentence
                  child: (C {(echo)} {(SQ <Add-ons>)})
                  terminator: <Op_Semi ';'>
                )
                (command.Sentence child:(C {(echo)}) terminator:<Op_Semi ';'>)
              ]
              redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(4)})]
            )
            (command.Pipeline
              children: [
                (C {(egrep)} {(SQ <'^(@c )?@node.*Top'>)} 
                  {
                    (word_part.CommandSubPart
                      command_list: 
                        (command.CommandList
                          children: [
                            (command.Pipeline
                              children: [
                                (C {(echo)} {($ VSub_Number '$2')} {(/dev/null)})
                                (C {(tr)} {(SQ <' '>)} {(SQ <'\\n'>)})
                                (C {(sort)})
                              ]
                              negated: F
                            )
                          ]
                        )
                      left_token: <Left_Backtick '`'>
                    )
                  }
                )
                (C {(cut)} {(-d) (Lit_Comma ',')} {(-f1)})
                (C {(sed)} {(SQ <'s/@c //;s/@node //'>)})
                (C {(build_menu)})
              ]
              negated: F
            )
          ]
        )
      ]
    )
    (command.BraceGroup
      children: [
        (command.Sentence child:(C {(echo)}) terminator:<Op_Semi ';'>)
        (command.Sentence child:(C {(echo)} {(SQ <Appendices>)}) terminator:<Op_Semi ';'>)
        (command.Sentence child:(C {(echo)}) terminator:<Op_Semi ';'>)
      ]
      redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(4)})]
    )
    (command.Pipeline
      children: [(C {(collect_nodes)} {($ VSub_Number '$3')}) (C {(build_menu)})]
      negated: F
    )
    (command.SimpleCommand
      words: [{(exec)}]
      redirects: [
        (redir.Redir op:<Redir_GreatAnd '3>&'> fd:3 arg_word:{(-)})
        (redir.Redir op:<Redir_GreatAnd '4>&'> fd:4 arg_word:{(-)})
        (redir.Redir op:<Redir_GreatAnd '5>&'> fd:5 arg_word:{(-)})
      ]
    )
    (C {(mv)} {(-f)} {(${ VSub_Name OUTDIR) (incl.) ($ VSub_Dollar '$$')} 
      {(${ VSub_Name OUTDIR) (chapters.texi)}
    )
    (command.BraceGroup
      children: [
        (C {(echo)} {(SQ <'@menu'>)})
        (C {($ VSub_DollarName '$AWK')} {(-F) (Lit_Other ':')} 
          {
            (SQ <'\n'> <'  /^\\*/ {\n'> <'    printf("%-32s", $1 "::");\n'> 
              <'    x = split($3, word, " ");\n'> <'    hpos = 34;\n'> <'    for (i = 1; i <= x; i++) {\n'> <'      hpos += length(word[i]) + 1;\n'> 
              <'      if (hpos > 78) {\n'> <'\tprintf("\\n%34s", "");\n'> <'\thpos = 35 + length(word[i]);\n'> <'      }\n'> 
              <'      printf(" %s", word[i]);\n'> <'    }\n'> <'    print ".";\n'> <'  }\n'> <'\n'> <'  !/^\\*/ { print; }\n'> <' '>
            )
          } {(${ VSub_Name OUTDIR) (smenu.) ($ VSub_Dollar '$$')}
        )
        (command.SimpleCommand
          words: [{(cat)}]
          redirects: [
            (redir.HereDoc
              op: <Redir_DLess '<<'>
              fd: 16777215
              here_begin: {(EOF)}
              here_end_span_id: 478
              stdin_parts: [
                ('* Free Manuals::\t\t Free Software Needs Free Documentation.\n')
                ('* Copying::                      The GNU Lesser General Public License says\n')
                (
'                                  how you can copy and share the GNU C Library.\n'
                )
                ('* Documentation License::        This manual is under the GNU Free\n')
                ('                                  Documentation License.\n')
                ('\n')
                ('Indices\n')
                ('\n')
                ('* Concept Index::                Index of concepts and names.\n')
                ('* Type Index::                   Index of types and type qualifiers.\n')
                ('* Function Index::               Index of functions and function-like macros.\n')
                ('* Variable Index::               Index of variables and variable-like macros.\n')
                ('* File Index::                   Index of programs and files.\n')
                ('\n')
                (' @detailmenu\n')
                (' --- The Detailed Node Listing ---\n')
              ]
            )
          ]
        )
        (C {(cat)} {(${ VSub_Name OUTDIR) (lmenu.) ($ VSub_Dollar '$$')})
        (C {(echo)} {(SQ <'@end detailmenu'>)})
        (command.Sentence child:(C {(echo)} {(SQ <'@end menu'>)}) terminator:<Op_Semi ';'>)
      ]
      redirects: [
        (redir.Redir
          op: <Redir_Great '>'>
          fd: 16777215
          arg_word: {(${ VSub_Name OUTDIR) (top-menu.texi.) ($ VSub_Dollar '$$')}
        )
      ]
    )
    (C {(mv)} {(-f)} {(${ VSub_Name OUTDIR) (top-menu.texi.) ($ VSub_Dollar '$$')} 
      {(${ VSub_Name OUTDIR) (top-menu.texi)}
    )
    (C {(rm)} {(-f)} {(${ VSub_Name OUTDIR) (Lit_Other '*') (.) ($ VSub_Dollar '$$')})
  ]
)