mirror of
https://github.com/postgres/postgres.git
synced 2025-06-22 02:52:08 +03:00
If EOF is found inside a string/comment/etc. stop parsing.
This commit is contained in:
@ -1701,6 +1701,10 @@ Sun Oct 26 10:47:05 CET 2003
|
|||||||
Thu Oct 30 11:12:37 CET 2003
|
Thu Oct 30 11:12:37 CET 2003
|
||||||
|
|
||||||
- Applied patch by Dave Cramer fixing several bugs in compatlib.
|
- Applied patch by Dave Cramer fixing several bugs in compatlib.
|
||||||
|
|
||||||
|
Fri Oct 31 15:09:22 CET 2003
|
||||||
|
|
||||||
|
- If EOF is found inside a string/comment/etc. stop parsing.
|
||||||
- Set ecpg version to 3.0.0
|
- Set ecpg version to 3.0.0
|
||||||
- Set ecpg library to 4.0.0
|
- Set ecpg library to 4.0.0
|
||||||
- Set pgtypes library to 1.0.0
|
- Set pgtypes library to 1.0.0
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.121 2003/10/19 13:22:33 meskes Exp $
|
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.122 2003/10/31 14:10:41 meskes Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -328,7 +328,7 @@ cppline {space}*#(.*\\{space})+.*
|
|||||||
<xc>{xcinside} { ECHO; }
|
<xc>{xcinside} { ECHO; }
|
||||||
<xc>{op_chars} { ECHO; }
|
<xc>{op_chars} { ECHO; }
|
||||||
|
|
||||||
<xc><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated /* comment"); }
|
<xc><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated /* comment"); }
|
||||||
|
|
||||||
<SQL>{xbstart} {
|
<SQL>{xbstart} {
|
||||||
token_start = yytext;
|
token_start = yytext;
|
||||||
@ -348,7 +348,7 @@ cppline {space}*#(.*\\{space})+.*
|
|||||||
<xb>{xbinside} { addlit(yytext, yyleng); }
|
<xb>{xbinside} { addlit(yytext, yyleng); }
|
||||||
<xh>{xhcat} |
|
<xh>{xhcat} |
|
||||||
<xb>{xbcat} { /* ignore */ }
|
<xb>{xbcat} { /* ignore */ }
|
||||||
<xb><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated bit string"); }
|
<xb><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated bit string"); }
|
||||||
|
|
||||||
<SQL>{xhstart} {
|
<SQL>{xhstart} {
|
||||||
token_start = yytext;
|
token_start = yytext;
|
||||||
@ -361,7 +361,7 @@ cppline {space}*#(.*\\{space})+.*
|
|||||||
return XCONST;
|
return XCONST;
|
||||||
}
|
}
|
||||||
|
|
||||||
<xh><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated hexadecimal integer"); }
|
<xh><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated hexadecimal integer"); }
|
||||||
<SQL>{xnstart} {
|
<SQL>{xnstart} {
|
||||||
/* National character.
|
/* National character.
|
||||||
* Need to remember type info to flow it forward into the parser.
|
* Need to remember type info to flow it forward into the parser.
|
||||||
@ -386,9 +386,9 @@ cppline {space}*#(.*\\{space})+.*
|
|||||||
<xq>{xqinside} { addlit(yytext, yyleng); }
|
<xq>{xqinside} { addlit(yytext, yyleng); }
|
||||||
<xq>{xqescape} { addlit(yytext, yyleng); }
|
<xq>{xqescape} { addlit(yytext, yyleng); }
|
||||||
<xq>{xqoctesc} { addlit(yytext, yyleng); }
|
<xq>{xqoctesc} { addlit(yytext, yyleng); }
|
||||||
<xq>{xqcat} { /* ignore */ }
|
<xq>{xqcat} { /* ignore */ }
|
||||||
|
|
||||||
<xq><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated quoted string"); }
|
<xq><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted string"); }
|
||||||
|
|
||||||
<SQL>{xdstart} {
|
<SQL>{xdstart} {
|
||||||
state_before = YYSTATE;
|
state_before = YYSTATE;
|
||||||
@ -409,7 +409,7 @@ cppline {space}*#(.*\\{space})+.*
|
|||||||
}
|
}
|
||||||
<xd>{xddouble} { addlitchar('"'); }
|
<xd>{xddouble} { addlitchar('"'); }
|
||||||
<xd>{xdinside} { addlit(yytext, yyleng); }
|
<xd>{xdinside} { addlit(yytext, yyleng); }
|
||||||
<xd,xdc><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated quoted identifier"); }
|
<xd,xdc><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted identifier"); }
|
||||||
<C,SQL>{xdstart} {
|
<C,SQL>{xdstart} {
|
||||||
state_before = YYSTATE;
|
state_before = YYSTATE;
|
||||||
BEGIN(xdc);
|
BEGIN(xdc);
|
||||||
|
Reference in New Issue
Block a user