code: def p_shell_command(p):
      '''shell_command : for_command
                       | case_command
                       | WHILE compound_list DO compound_list DONE
                       | UNTIL compound_list DO compound_list DONE
                       | select_command
                       | if_command
                       | subshell
                       | group_command
                       | arith_command
                       | cond_command
                       | arith_for_command'''
      if len(p) == 2:
          p[0] = p[1]
      else:
          # while or until
          assert p[2].kind == 'list'
  
          parts = _makeparts(p)
          kind = parts[0].word
          assert kind in ('while', 'until')
          p[0] = ast.node(kind='compound',
                          redirects=[],
                          list=[ast.node(kind=kind, parts=parts, pos=_partsspan(parts))],
                          pos=_partsspan(parts))
  
      assert p[0].kind == 'compoundf p_shell_command(p):
      '''shell_command : for_command
                       | case_command
                       | WHILE compound_list DO compound_list DONE
                       | UNTIL compound_list DO compound_list DONE
                       | select_command
                       | if_command
                       | subshell
                       | group_command
                       | arith_command
                       | cond_command
                       | arith_for_command'''
      if len(p) == 2:
          p[0] = p[1]
      else:
          # while or until
          assert p[2].kind == 'list'
  
          parts = _makeparts(p)
          kind = parts[0].word
          assert kind in ('while', 'until')
          p[0] = ast.node(kind='compound',
                          redirects=[],
                          list=[ast.node(kind=kind, parts=parts, pos=_partsspan(parts))],
                          pos=_partsspan(parts))
  
      assert p[0].kind == 'compound'
docs: shell_command : for_command
                       | case_command
                       | WHILE compound_list DO compound_list DONE
                       | UNTIL compound_list DO compound_list DONE
                       | select_command
                       | if_command
                       | subshell
                       | group_command
                       | arith_command
                       | cond_command
                       | arith_for_command