We're updating the issue view to help you get more done.Learn more

Clarify quoting rules in ADL

From Andrew Patterson:
With respect to ADL quoting rules...
...what should the behaviour be when a
\ is used without a valid 'quotation' character following i.e. \\
and \" should be interpreted as \ and " respectively, but should
\. be interpreted a one character . or two characters \.? I'd suggest
that if the quotation character is not recongised, then it should
be an error.

Furthermore, what are the rules around the &#xHHHH escape
sequence? Surely the & will have to be quoted as well? Otherwise
how will the parser know when it is being used for a mnenomic?
 Wouldn't a unicode escape technique such as used in Java and C#
(\uAABB) be a better approach (i.e. one that fits in more
comfortably with the standard \" quoting rules).

Finally, what about the other standard string escapes used
in Java and C# (\t, \b etc). Is there any room for them (maybe
in ADL 2.0?)

The basic problem here is to have a consistent way of doing the following:
- quoting literals like the " and ' characters (currently uses a backslash)
- allowing other quoted characters such as \r, \n, \t etc - what is the list?
- quoting unicode characters. Is this needed given that real unicode can be used?
  It may be needed for systems and transmission in situations where unicode (or
  any non-ascii) cannot be tolerated. But we probably want a way of differentiating
  between proper unicode files and ASCII fles containing quoted characters.





Andrew Patterson

Change Description

Changes proposed: - support the following basic backslash quoted characters in strings: \r - carriage return \n - linefeed \t - tab \\ - backslash \" - literal " and in characters, \' for literal ' - use the \uHHHH and \UHHHHHHHH quoting forms used in programming languages, in ASCII versions of ADL files. - add an optional "encoding" marker to ADL, which can have the values "iso-8859-1" or "utf-8" (both case-insensitive). Make this mandatory in ADL-2 - add the encoding marker to the AOM

Approved By



Fix versions