If EOF is found inside a string/comment/etc. stop parsing.
authorMichael Meskes
Fri, 31 Oct 2003 14:10:41 +0000 (14:10 +0000)
committerMichael Meskes
Fri, 31 Oct 2003 14:10:41 +0000 (14:10 +0000)
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/preproc/pgc.l

index 8e5e533e9f2e143f0e2ca7e9b2dc88d384a80e9f..cec336d6d7b7b892ef23860e00abb99763175f3e 100644 (file)
@@ -1701,6 +1701,10 @@ Sun Oct 26 10:47:05 CET 2003
 Thu Oct 30 11:12:37 CET 2003
 
    - 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 library to 4.0.0
    - Set pgtypes library to 1.0.0
index eda6706ea27fbf01206028fcafbfb402da06d0ca..0302e2bceaba66ad85a3d77b2cb04b81c942850c 100644 (file)
@@ -12,7 +12,7 @@
  *
  *
  * 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})+.*
 {xcinside}     { ECHO; }
 {op_chars}     { ECHO; }
 
-<>            { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated /* comment"); }
+<>        { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated /* comment"); }
 
 {xbstart} {
                        token_start = yytext;
@@ -348,7 +348,7 @@ cppline         {space}*#(.*\\{space})+.*
 {xbinside} { addlit(yytext, yyleng); }
 {xhcat}        |
 {xbcat}        { /* ignore */ }
-<>        { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated bit string"); }
+<>        { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated bit string"); }
 
 {xhstart}     {
                        token_start = yytext;
@@ -361,7 +361,7 @@ cppline         {space}*#(.*\\{space})+.*
                        return XCONST;
                    }
 
-<>            { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated hexadecimal integer"); }
+<>        { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated hexadecimal integer"); }
 {xnstart}              {
                /* National character.
                 * Need to remember type info to flow it forward into the parser.
@@ -386,9 +386,9 @@ cppline         {space}*#(.*\\{space})+.*
 {xqinside}     { addlit(yytext, yyleng); }
 {xqescape}     { addlit(yytext, yyleng); }
 {xqoctesc}          { addlit(yytext, yyleng); }
-{xqcat}            { /* ignore */ }
+{xqcat}        { /* ignore */ }
 
-<>            { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated quoted string"); }
+<>        { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted string"); }
 
 {xdstart}     {
                        state_before = YYSTATE;
@@ -409,7 +409,7 @@ cppline         {space}*#(.*\\{space})+.*
                    }
 {xddouble}     { addlitchar('"'); }
 {xdinside}     { addlit(yytext, yyleng); }
-<>        { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated quoted identifier"); }
+<>        { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted identifier"); }
 {xdstart}   {
                        state_before = YYSTATE;
                        BEGIN(xdc);