I'm late in the game but why not using the same system as Perl, PHP, Ruby to solve the Lts [1], i.e you have a sequence that says this is the starts of a raw string (%Q, qq, m) then a character (in a predefined list), the raw string and at the end of the raw string the same character as at the beginning (or its mirror).
By example, this 'raw' as prefix for a raw string raw`this is a raw string` raw'this is another raw string' raw[yet another raw string] Rémi [1] https://en.wikipedia.org/wiki/Leaning_toothpick_syndrome > De: "John Rose" <john.r.r...@oracle.com> > À: "Alex Buckley" <alex.buck...@oracle.com> > Cc: "amber-spec-experts" <amber-spec-experts@openjdk.java.net> > Envoyé: Mercredi 14 Février 2018 23:46:54 > Objet: Re: Raw string literals and Unicode escapes > On Feb 14, 2018, at 2:42 PM, Alex Buckley < [ mailto:alex.buck...@oracle.com | > alex.buck...@oracle.com ] > wrote: >> Also, the inclusion of RawSP makes the lexing of RawStringLiteral ambiguous, >> since RawStringBody allows opening and closing whitespace. No doubt this can >> be >> fixed with rules involving "If the first character after RawSP is a backtick >> ...", but now being like Markdown is getting expensive. > These matters are already covered in the draft, under the blanket > provision that the RSB cannot contain a close-quote sequence. > So I don't think I swept anything under the covers there. > A similar effect could be gotten by replacing RawSP with any > other raw character (fixed by the JLS), such as period ``.asdf.``, > double-quote ``"asdf"``, etc.