On 08/13/2018 02:05 AM, Markus Armbruster wrote:
Eric Blake <ebl...@redhat.com> writes:

On 08/08/2018 07:03 AM, Markus Armbruster wrote:
Both lexer and parser reject invalid escape sequences in strings.  The
parser's check is useless.


+ * Extensions over RFC 7159:
+ * - Extra escape sequence in strings:
+ *   0x27 (apostrophe) is recognized after escape, too
+ * - Single-quoted strings:
+ *   Like double-quoted strings, except they're delimited by %x27
+ *   (apostrophe) instead of %x22 (quotation mark), and can't contain
+ *   unescaped apostrophe, but can contain unescaped quotation mark.
+ *
+ * Note:
+ * - Encoding is modified UTF-8.

That is an extension over RFC 7159. But I'm okay with leaving it in
the Notes section.

+ * - Invalid Unicode characters are rejected.
+ * - Control characters are rejected by the lexer.

Worth being explicit that this is 00-1f, fe, and ff?

\xFE and \xFF are invalid, not control.

What about:

  * - Invalid Unicode characters are rejected.
  * - Control characters \x00..\x1F are rejected by the lexer.

Works for me.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to