Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 727a5a1

Browse files
author
Michael Meskes
committed
Added rule to ecpg lexer to accept "Unicode surrogate pair in extended quoted
string". This is not really needed because the string gets copied to the output untranslated anyway, but by adding this rule the lexer stays in sync with the backend lexer.
1 parent 9de3aa6 commit 727a5a1

File tree

1 file changed

+2
-0
lines changed
  • src/interfaces/ecpg/preproc

1 file changed

+2
-0
lines changed

src/interfaces/ecpg/preproc/pgc.l

+2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ xeinside [^\\']+
146146
xeescape [\\][^0-7]
147147
xeoctesc [\\][0-7]{1,3}
148148
xehexesc [\\]x[0-9A-Fa-f]{1,2}
149+
xeunicode [\\](u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})
149150

150151
/* C version of hex number */
151152
xch 0[xX][0-9A-Fa-f]*
@@ -505,6 +506,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})(.*\\{space})*.
505506
}
506507
<xq,xqc,xn,xus>{xqinside} { addlit(yytext, yyleng); }
507508
<xe>{xeinside} { addlit(yytext, yyleng); }
509+
<xe>{xeunicode} { addlit(yytext, yyleng); }
508510
<xe>{xeescape} { addlit(yytext, yyleng); }
509511
<xe>{xeoctesc} { addlit(yytext, yyleng); }
510512
<xe>{xehexesc} { addlit(yytext, yyleng); }

0 commit comments

Comments
 (0)