Re: Raw string literals and Unicode escapes

2018-02-13 Thread John Rose
On Feb 13, 2018, at 2:19 PM, Jim Laskey wrote: > > So, change the scanner to > > A) Peek back to make sure the first open backtick was exactly a backtick. > B) Turn off Unicode escapes immediately so that only backtick characters can > be part of the delimiter. > C) Turn on Unicode escapes only

Re: Raw string literals and Unicode escapes

2018-02-13 Thread Jim Laskey
10a. String s = `abc`; 10b. String s = \u0060abc`; As it stands both are legal. This decision has been mostly taken away from us because the lookahead of the previous token has “consumed" the character. There is little hope of finding out which form the backtick was derived. Not technically tru

Re: Raw string literals and Unicode escapes

2018-02-13 Thread John Rose
On Feb 13, 2018, at 9:58 AM, Alex Buckley wrote: > > I suspect the trickiest part of specifying raw string literals will be the > lexer's modal behavior for Unicode escapes. As such, I am going to put the > behavior under the microscope. For an approach to this see: http://cr.openjdk.java.ne

Raw string literals and Unicode escapes

2018-02-13 Thread Alex Buckley
I suspect the trickiest part of specifying raw string literals will be the lexer's modal behavior for Unicode escapes. As such, I am going to put the behavior under the microscope. Here is what the JEP has to say: - Unicode escapes, in the form \u, are processed as part of character in

Re: Raw String Literals Revisions

2018-02-13 Thread John Rose
On Feb 5, 2018, at 8:58 AM, Jim Laskey wrote: > > Based on input received since the reveal of > https://bugs.openjdk.java.net/browse/JDK-8196004 > > Raw String Literals, we propose making the following changes. I have written a draft edit to t