Index: src/interfaces/ecpg/preproc/pgc.l =================================================================== RCS file: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v retrieving revision 1.140 diff -c -c -r1.140 pgc.l *** src/interfaces/ecpg/preproc/pgc.l 2 Feb 2006 03:51:41 -0000 1.140 --- src/interfaces/ecpg/preproc/pgc.l 2 Feb 2006 04:38:28 -0000 *************** *** 134,140 **** */ xqstart {quote} xqdouble {quote}{quote} ! xqinside [^\\']+ xqescape [\\][^0-7] xqoctesc [\\][0-7]{1,3} xqhexesc [\\]x[0-9A-Fa-f]{1,2} --- 134,140 ---- */ xqstart {quote} xqdouble {quote}{quote} ! xqinside [^\\'{newline}] xqescape [\\][^0-7] xqoctesc [\\][0-7]{1,3} xqhexesc [\\]x[0-9A-Fa-f]{1,2} *************** *** 152,158 **** dolq_cont [A-Za-z\200-\377_0-9] dolqdelim \$({dolq_start}{dolq_cont}*)?\$ dolqfailed \${dolq_start}{dolq_cont}* ! dolqinside [^$]+ /* Double quote * Allows embedded spaces and other special characters into identifiers. --- 152,158 ---- dolq_cont [A-Za-z\200-\377_0-9] dolqdelim \$({dolq_start}{dolq_cont}*)?\$ dolqfailed \${dolq_start}{dolq_cont}* ! dolqinside [^$'{newline}] /* Double quote * Allows embedded spaces and other special characters into identifiers. *************** *** 161,167 **** xdstart {dquote} xdstop {dquote} xddouble {dquote}{dquote} ! xdinside [^"]+ /* special stuff for C strings */ xdcqq \\\\ --- 161,167 ---- xdstart {dquote} xdstop {dquote} xddouble {dquote}{dquote} ! xdinside [^"] /* special stuff for C strings */ xdcqq \\\\ *************** *** 423,429 **** return SCONST; } {xqdouble} { addlitchar('\''); } ! {xqinside} { addlit(yytext, yyleng); } {xqescape} { check_escape_warning(); addlit(yytext, yyleng); --- 423,433 ---- return SCONST; } {xqdouble} { addlitchar('\''); } ! {xqinside} { ! if (yytext[0] == '\r' || yytext[0] == '\n') ! addlitchar('\\'); /* C string continuation */ ! addlitchar(yytext[0]); ! } {xqescape} { check_escape_warning(); addlit(yytext, yyleng); *************** *** 473,482 **** yyless(yyleng-1); } } ! {dolqinside} { addlit(yytext, yyleng); } {dolqfailed} { addlit(yytext, yyleng); } . { ! /* This is only needed for $ inside the quoted text */ addlitchar(yytext[0]); } <> { yyerror("unterminated dollar-quoted string"); } --- 477,493 ---- yyless(yyleng-1); } } ! {dolqinside} { ! if (yytext[0] == '\r' || yytext[0] == '\n') ! addlitchar('\\'); /* C string continuation */ ! addlitchar(yytext[0]); ! } {dolqfailed} { addlit(yytext, yyleng); } . { ! /* $$ is implemented as a single-quoted string, so double it? */ ! if (yytext[0] == '\'') ! addlitchar(yytext[0]); ! /* single quote or dollar sign */ addlitchar(yytext[0]); } <> { yyerror("unterminated dollar-quoted string"); }