*** pgsql-cvs/src/backend/parser/scan.l Sat Mar 18 23:49:15 2000 --- pgsql/src/backend/parser/scan.l Sat May 20 19:44:04 2000 *************** *** 255,262 **** {xcinside} { /* ignore */ } - <> { elog(ERROR, "Unterminated /* comment"); } - {xbstart} { BEGIN(xb); startlit(); --- 255,260 ---- *************** *** 280,286 **** {xbcat} { /* ignore */ } - <> { elog(ERROR, "Unterminated binary integer"); } {xhstart} { BEGIN(xh); --- 278,283 ---- *************** *** 297,303 **** literalbuf); return ICONST; } - <> { elog(ERROR, "Unterminated hexadecimal integer"); } {xqstart} { BEGIN(xq); --- 294,299 ---- *************** *** 316,322 **** {xqcat} { /* ignore */ } - <> { elog(ERROR, "Unterminated quoted string"); } {xdstart} { --- 312,317 ---- *************** *** 331,337 **** {xdinside} { addlit(yytext, yyleng); } - <> { elog(ERROR, "Unterminated quoted identifier"); } {typecast} { return TYPECAST; } --- 326,331 ---- *************** *** 468,477 **** elog(ERROR, "parser: %s at or near \"%s\"", message, yytext); } int yywrap() { ! return(1); } /* init_io: --- 462,501 ---- elog(ERROR, "parser: %s at or near \"%s\"", message, yytext); } + + /* + * POSIX stores the active start condition in YY_START, AT&T in YYSTATE + */ + #ifndef YY_START + # define YY_START YYSTATE + #endif + int yywrap() { ! if (YY_START == INITIAL) ! return 1; ! ! /* ! * If there's still a start condition active at the end of input, ! * then someone must have forgotten to close a delimited block. ! */ ! switch (YY_START) ! { ! case xc: ! elog(ERROR, "Unterminated /* comment"); ! case xb: ! elog(ERROR, "Unterminated binary integer"); ! case xh: ! elog(ERROR, "Unterminated hexadecimal integer"); ! case xq: ! elog(ERROR, "Unterminated quoted string"); ! case xd: ! elog(ERROR, "Unterminated quoted identifier"); ! } ! ! return 1; } + /* init_io: