bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15212: 24.3.50; c++-mode doesn't support raw string literals


From: Michael Welsh Duggan
Subject: bug#15212: 24.3.50; c++-mode doesn't support raw string literals
Date: Tue, 31 May 2016 19:52:55 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux)

Alan Mackenzie <acm@muc.de> writes:

> Hello again, Ivan.
>
> On Tue, May 31, 2016 at 08:22:07AM -0600, Ivan Andrus wrote:
>> On May 29, 2016, at 3:36 PM, Alan Mackenzie <acm@muc.de> wrote:
>
>>> I've now got a patch, which I'd be grateful if you could try out, both
>>> to see if there are any bugs, and also to get your general impression.
>>> I think there are one or two bugs left in the code, and it needs tidying
>>> up quite a lot.  So this won't be the final version.
>
>
>> Awesome.  I’ll keep looking and let you know of any bugs I find.
>
>> I did find one.  According to
>> http://en.cppreference.com/w/cpp/language/string_literal the delimiter can
>> contain any characters except parentheses, backslash and spaces.
>
> Yes, I've read that and got angry with it.  It's vague - it's not clear
> what is meant by "any source character" - the C++11 page in Wikipedia
> says that control characters are excluded.  In practice, I suspect it
> won't matter all that much - most of the time the delimiter will just be
> "\"(" - anybody trying to do anything fancy in the delimiter deserves
> everything she gets.  ;-)

Her's what the standard says:

<raw-string>: 
  " <d-char-sequence(opt)> ( <r-char-sequence(opt)> ) <d-char-sequence(opt)> "

<r-char-sequence>:
  <r-char>
  <r-char-sequence> <r-char>

<r-char>:
  Any member of the source character set, except a right-parenthesis )
  followed by the initial <d-char-sequence> (which may be empty)
  followed by a double quote ".

<d-char-sequence>:
  <d-char>
  <d-char-sequence> <d-char>

<d-char>:
  any member of the basic source character set except:
    space, the left parenthesis (, the right parenthesis ), the
    backslash \, and the control characters representing horizontal tab,
    vertical tab, form feed, and newline.

Here's what it says about the basic source character set:

The basic source character set consists of 96 characters: the space
character, the control characters representing horizontal tab, vertical
tab, form feed, and new-line, plus the following 91 graphical
characters:

  a b c d e f g h i j k l m n o p q r s t u v w x y z
  A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
  0 1 2 3 4 5 6 7 8 9
  _ { } [ ] # ( ) < > % : ; . ? * + - / ^ & | ~ ! = , \ " ’   


-- 
Michael Welsh Duggan
(md5i@md5i.com)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]