2023-06-22 22:44:07 -04:00
|
|
|
==========================
|
|
|
|
JSON string arrays
|
|
|
|
==========================
|
|
|
|
|
|
|
|
CMD ["a", "bcd"]
|
|
|
|
CMD ["\"\\"]
|
|
|
|
CMD ["\b\f\n\r\t\u0ABC\u12Cd"]
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(cmd_instruction
|
|
|
|
(json_string_array
|
|
|
|
(json_string)
|
|
|
|
(json_string)))
|
|
|
|
(cmd_instruction
|
|
|
|
(json_string_array
|
2023-06-23 17:54:29 -04:00
|
|
|
(json_string
|
|
|
|
(escape_sequence)
|
|
|
|
(escape_sequence))))
|
2023-06-22 22:44:07 -04:00
|
|
|
(cmd_instruction
|
|
|
|
(json_string_array
|
2023-06-23 17:54:29 -04:00
|
|
|
(json_string
|
|
|
|
(escape_sequence)
|
|
|
|
(escape_sequence)
|
|
|
|
(escape_sequence)
|
|
|
|
(escape_sequence)
|
|
|
|
(escape_sequence)
|
|
|
|
(escape_sequence)
|
|
|
|
(escape_sequence)))))
|
2023-06-22 22:44:07 -04:00
|
|
|
|
|
|
|
==========================
|
|
|
|
Double-quoted strings
|
|
|
|
==========================
|
|
|
|
|
|
|
|
ENV KEY "value"
|
|
|
|
ENV KEY "conti\
|
|
|
|
nue"
|
|
|
|
ENV KEY "quotes: \" '"
|
|
|
|
ENV KEY "backslash: \\"
|
|
|
|
ENV KEY "not escape sequences: \a \n"
|
|
|
|
ENV KEY "expansions: $FOO ${BAR}"
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
|
|
|
(double_quoted_string)))
|
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
|
|
|
(double_quoted_string
|
|
|
|
(line_continuation))))
|
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
|
|
|
(double_quoted_string
|
2023-06-23 17:54:29 -04:00
|
|
|
(escape_sequence))))
|
2023-06-22 22:44:07 -04:00
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
|
|
|
(double_quoted_string
|
2023-06-23 17:54:29 -04:00
|
|
|
(escape_sequence))))
|
2023-06-22 22:44:07 -04:00
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
2023-06-23 16:12:10 -04:00
|
|
|
(double_quoted_string)))
|
2023-06-22 22:44:07 -04:00
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
|
|
|
(double_quoted_string
|
|
|
|
(expansion
|
|
|
|
(variable))
|
|
|
|
(expansion
|
|
|
|
(variable))))))
|
|
|
|
|
|
|
|
==========================
|
|
|
|
Single-quoted strings
|
|
|
|
==========================
|
|
|
|
|
|
|
|
ENV KEY 'value'
|
|
|
|
ENV KEY 'conti\
|
|
|
|
nue'
|
|
|
|
ENV KEY 'quotes: \' \''
|
|
|
|
ENV KEY 'backslash: \\'
|
|
|
|
ENV KEY 'not escape sequences: \a \n'
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
|
|
|
(single_quoted_string)))
|
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
|
|
|
(single_quoted_string
|
|
|
|
(line_continuation))))
|
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
|
|
|
(single_quoted_string
|
2023-06-23 17:54:29 -04:00
|
|
|
(escape_sequence)
|
|
|
|
(escape_sequence))))
|
2023-06-22 22:44:07 -04:00
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
|
|
|
(single_quoted_string
|
2023-06-23 17:54:29 -04:00
|
|
|
(escape_sequence))))
|
2023-06-22 22:44:07 -04:00
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
2023-06-23 16:12:10 -04:00
|
|
|
(single_quoted_string))))
|
2023-06-22 22:44:07 -04:00
|
|
|
|
|
|
|
==========================
|
|
|
|
Unquoted strings
|
|
|
|
==========================
|
|
|
|
|
|
|
|
ENV KEY value
|
|
|
|
ENV KEY two\ words
|
|
|
|
ENV KEY conti\
|
|
|
|
nue
|
|
|
|
ENV KEY $FOO${BAR}baz
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(source_file
|
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
|
|
|
(unquoted_string)))
|
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
|
|
|
(unquoted_string)))
|
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
|
|
|
(unquoted_string
|
|
|
|
(line_continuation))))
|
|
|
|
(env_instruction
|
|
|
|
(env_pair
|
|
|
|
(unquoted_string)
|
|
|
|
(unquoted_string
|
|
|
|
(expansion
|
|
|
|
(variable))
|
|
|
|
(expansion
|
|
|
|
(variable))))))
|