---
Γ := rules "expr"
  expr := rules "expr_function"
    expr_function := rules "{" "formals" "}" ":" "expr_function"
      { := lexemes "{"
        { "{" (1, 1)
      formals := rules "formal" "," "formals"
        formal := rules "ID"
          ID := lexemes "ID"
            ID "targetRoot" (1, 3)
        , := lexemes ","
          , "," (1, 13)
        formals := rules "formal"
          formal := rules "ID"
            ID := lexemes "ID"
              ID "wgetExtraOptions" (1, 15)
      } := lexemes "}"
        } "}" (1, 32)
      : := lexemes ":"
        : ":" (1, 33)
      expr_function := rules "expr_if"
        expr_if := rules "expr_op"
          expr_op := rules "expr_app"
            expr_app := rules "expr_select"
              expr_select := rules "expr_simple"
                expr_simple := rules "IND_STRING_OPEN" "ind_string_parts" "IND_STRING_CLOSE"
                  IND_STRING_OPEN := lexemes "IND_STRING_OPEN"
                    IND_STRING_OPEN "''\n" (6, 1)
                  ind_string_parts := rules "ind_string_parts" "IND_STR"
                    ind_string_parts := rules "ind_string_parts" "DOLLAR_CURLY" "expr" "}"
                      ind_string_parts := rules "ind_string_parts" "IND_STR"
                        ind_string_parts := rules "ind_string_parts" "DOLLAR_CURLY" "expr" "}"
                          ind_string_parts := rules "ind_string_parts" "IND_STR"
                            ind_string_parts := rules 
                            IND_STR := lexemes "IND_STR"
                              IND_STR "  metaDir=" (7, 1)
                          DOLLAR_CURLY := lexemes "DOLLAR_CURLY"
                            DOLLAR_CURLY "${" (7, 11)
                          expr := rules "expr_function"
                            expr_function := rules "expr_if"
                              expr_if := rules "expr_op"
                                expr_op := rules "expr_app"
                                  expr_app := rules "expr_select"
                                    expr_select := rules "expr_simple"
                                      expr_simple := rules "ID"
                                        ID := lexemes "ID"
                                          ID "targetRoot" (7, 13)
                          } := lexemes "}"
                            } "}" (7, 23)
                        IND_STR := lexemes "IND_STR"
                          IND_STR "etc/ec2-metadata\n  mkdir -m 0755 -p \"$metaDir\"\n  rm -f \"$metaDir/*\"\n\n  echo \"getting instance metadata...\"\n\n  wget_imds() {\n    wget " (7, 24)
                      DOLLAR_CURLY := lexemes "DOLLAR_CURLY"
                        DOLLAR_CURLY "${" (14, 10)
                      expr := rules "expr_function"
                        expr_function := rules "expr_if"
                          expr_if := rules "expr_op"
                            expr_op := rules "expr_app"
                              expr_app := rules "expr_select"
                                expr_select := rules "expr_simple"
                                  expr_simple := rules "ID"
                                    ID := lexemes "ID"
                                      ID "wgetExtraOptions" (14, 12)
                      } := lexemes "}"
                        } "}" (14, 28)
                    IND_STR := lexemes "IND_STR"
                      IND_STR " \"$@\"\n  }\n\n  wget_imds -O \"$metaDir/ami-manifest-path\" http://169.254.169.254/1.0/meta-data/ami-manifest-path\n  # When no user-data is provided, the OpenStack metadata server doesn't expose the user-data route.\n  (umask 077 && wget_imds -O \"$metaDir/user-data\" http://169.254.169.254/1.0/user-data || rm -f \"$metaDir/user-data\")\n  wget_imds -O \"$metaDir/hostname\" http://169.254.169.254/1.0/meta-data/hostname\n  wget_imds -O \"$metaDir/public-keys-0-openssh-key\" http://169.254.169.254/1.0/meta-data/public-keys/0/openssh-key\n" (14, 29)
                  IND_STRING_CLOSE := lexemes "IND_STRING_CLOSE"
                    IND_STRING_CLOSE "''" (22, 1)