Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite615230

Browse files
author
Michael Meskes
committed
If EOF is found inside a string/comment/etc. stop parsing.
1 parentef1b846 commite615230

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,6 +1701,10 @@ Sun Oct 26 10:47:05 CET 2003
17011701
Thu Oct 30 11:12:37 CET 2003
17021702

17031703
- Applied patch by Dave Cramer fixing several bugs in compatlib.
1704+
1705+
Fri Oct 31 15:09:22 CET 2003
1706+
1707+
- If EOF is found inside a string/comment/etc. stop parsing.
17041708
- Set ecpg version to 3.0.0
17051709
- Set ecpg library to 4.0.0
17061710
- Set pgtypes library to 1.0.0

‎src/interfaces/ecpg/preproc/pgc.l

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.121 2003/10/19 13:22:33 meskes Exp $
15+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.122 2003/10/31 14:10:41 meskes Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -328,7 +328,7 @@ cppline{space}*#(.*\\{space})+.*
328328
<xc>{xcinside}{ ECHO; }
329329
<xc>{op_chars}{ ECHO; }
330330

331-
<xc><<EOF>>{mmerror(PARSE_ERROR,ET_ERROR,"Unterminated /* comment"); }
331+
<xc><<EOF>>{mmerror(PARSE_ERROR,ET_FATAL,"Unterminated /* comment"); }
332332

333333
<SQL>{xbstart}{
334334
token_start = yytext;
@@ -348,7 +348,7 @@ cppline{space}*#(.*\\{space})+.*
348348
<xb>{xbinside}{addlit(yytext, yyleng); }
349349
<xh>{xhcat}|
350350
<xb>{xbcat}{/* ignore */ }
351-
<xb><<EOF>>{mmerror(PARSE_ERROR,ET_ERROR,"Unterminated bit string"); }
351+
<xb><<EOF>>{mmerror(PARSE_ERROR,ET_FATAL,"Unterminated bit string"); }
352352

353353
<SQL>{xhstart}{
354354
token_start = yytext;
@@ -361,7 +361,7 @@ cppline{space}*#(.*\\{space})+.*
361361
return XCONST;
362362
}
363363

364-
<xh><<EOF>>{mmerror(PARSE_ERROR,ET_ERROR,"Unterminated hexadecimal integer"); }
364+
<xh><<EOF>>{mmerror(PARSE_ERROR,ET_FATAL,"Unterminated hexadecimal integer"); }
365365
<SQL>{xnstart} {
366366
/* National character.
367367
* Need to remember type info to flow it forward into the parser.
@@ -386,9 +386,9 @@ cppline{space}*#(.*\\{space})+.*
386386
<xq>{xqinside}{addlit(yytext, yyleng); }
387387
<xq>{xqescape} {addlit(yytext, yyleng); }
388388
<xq>{xqoctesc} {addlit(yytext, yyleng); }
389-
<xq>{xqcat}{/* ignore */ }
389+
<xq>{xqcat}{/* ignore */ }
390390

391-
<xq><<EOF>>{mmerror(PARSE_ERROR,ET_ERROR,"Unterminated quoted string"); }
391+
<xq><<EOF>>{mmerror(PARSE_ERROR,ET_FATAL,"Unterminated quoted string"); }
392392

393393
<SQL>{xdstart}{
394394
state_before = YYSTATE;
@@ -409,7 +409,7 @@ cppline{space}*#(.*\\{space})+.*
409409
}
410410
<xd>{xddouble}{addlitchar('"'); }
411411
<xd>{xdinside}{addlit(yytext, yyleng); }
412-
<xd,xdc><<EOF>>{mmerror(PARSE_ERROR,ET_ERROR,"Unterminated quoted identifier"); }
412+
<xd,xdc><<EOF>>{mmerror(PARSE_ERROR,ET_FATAL,"Unterminated quoted identifier"); }
413413
<C,SQL>{xdstart}{
414414
state_before = YYSTATE;
415415
BEGIN(xdc);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp