From e046b3ddd7336aa1e6482c54dcd6b8df487f0f86 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 16 Jun 2005 01:43:48 +0000 Subject: [PATCH] Add \x hex support to ecpg strings. This just passes them to the backend. --- src/interfaces/ecpg/preproc/pgc.l | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l index ce1b4eb885..c86f2cdf1e 100644 --- a/src/interfaces/ecpg/preproc/pgc.l +++ b/src/interfaces/ecpg/preproc/pgc.l @@ -12,7 +12,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.135 2005/02/02 15:37:43 meskes Exp $ + * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.136 2005/06/16 01:43:48 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -139,8 +139,9 @@ xqstart {quote} xqstop {quote} xqdouble {quote}{quote} xqinside [^\\']+ -xqescape [\\][^0-7] -xqoctesc [\\][0-7]{1,3} +xqescape [\\][^0-7] +xqoctesc [\\][0-7]{1,3} +xqhexesc [\\]x[0-9A-Fa-f]{1,2} xqcat {quote}{whitespace_with_newline}{quote} /* $foo$ style quotes ("dollar quoting") @@ -400,7 +401,8 @@ cppline {space}*#(.*\\{space})*.*{newline} {xqdouble} { addlitchar('\''); } {xqinside} { addlit(yytext, yyleng); } {xqescape} { addlit(yytext, yyleng); } -{xqoctesc} { addlit(yytext, yyleng); } +{xqoctesc} { addlit(yytext, yyleng); } +{xqhexesc} { addlit(yytext, yyleng); } {xqcat} { /* ignore */ } . { /* This is only needed for \ just before EOF */