Re: [PATCH] Fix raw-string handling (PR preprocessor/57620)

2013-07-20 Thread Jason Merrill
OK, thanks. Jason

Re: [PATCH] Fix raw-string handling (PR preprocessor/57620)

2013-07-19 Thread Jakub Jelinek
On Fri, Jul 19, 2013 at 07:33:19PM +0200, Jakub Jelinek wrote: > On Thu, Jul 18, 2013 at 12:29:25PM -0400, Jason Merrill wrote: > > Hmm, that logic is difficult to follow. It needs comments at least > > explaining last_seen_* and why the loop in the suffix handling keeps > > going after we change

Re: [PATCH] Fix raw-string handling (PR preprocessor/57620)

2013-07-19 Thread Jakub Jelinek
On Thu, Jul 18, 2013 at 12:29:25PM -0400, Jason Merrill wrote: > Hmm, that logic is difficult to follow. It needs comments at least > explaining last_seen_* and why the loop in the suffix handling keeps > going after we change the phase to RAW_STR. > > Maybe instead of tracking last_seen_* BUFF_A

Re: [PATCH] Fix raw-string handling (PR preprocessor/57620)

2013-07-18 Thread Jason Merrill
Hmm, that logic is difficult to follow. It needs comments at least explaining last_seen_* and why the loop in the suffix handling keeps going after we change the phase to RAW_STR. Maybe instead of tracking last_seen_* BUFF_APPEND could copy into a short local char array as well as the string

Re: [PATCH] Fix raw-string handling (PR preprocessor/57620)

2013-07-14 Thread Jakub Jelinek
On Thu, Jul 11, 2013 at 01:32:58AM +0200, Jakub Jelinek wrote: > With this make check RUNTESTFLAGS=dg.exp=raw-string* passes, but perhaps > I'll need to play with gcov and add some new testcases, e.g. ones > I have in mind are R"??(??)??"; which wouldn't work correctly if we didn't > stop consuming

Re: [PATCH] Fix raw-string handling (PR preprocessor/57620)

2013-07-10 Thread Jakub Jelinek
On Wed, Jul 10, 2013 at 02:22:56AM -0400, Jason Merrill wrote: > It seems undesirable to go from one to four separate copies of the > note-handling code. Could we instead handle the different states of > prefix, body and suffix parsing in local variables and just have one > loop over the character

Re: [PATCH] Fix raw-string handling (PR preprocessor/57620)

2013-07-09 Thread Jason Merrill
It seems undesirable to go from one to four separate copies of the note-handling code. Could we instead handle the different states of prefix, body and suffix parsing in local variables and just have one loop over the characters/notes in the input? Jason

Re: [PATCH] Fix raw-string handling (PR preprocessor/57620)

2013-06-27 Thread Jakub Jelinek
On Mon, Jun 17, 2013 at 06:28:46PM +0200, Jakub Jelinek wrote: > lex_raw_string right now only undoes phase {1,2} transformations in between > R"delim( and )delim", while it should undo them everywhere between R" and > the final ". The following patch implements that, and adds testsuite > coverage