1212 *
1313 *
1414 * IDENTIFICATION
15- * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.81 2001/09/19 14:09:32 meskes Exp $
15+ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.82 2001/12/09 15:27:49 meskes Exp $
1616 *
1717 *-------------------------------------------------------------------------
1818*/
@@ -306,7 +306,7 @@ cppline{space}*#(.*\\{line_end})*.*
306306<xc >{xcinside }{ ECHO; }
307307<xc >{op_chars } { ECHO; }
308308
309- <xc ><<EOF>> {mmerror (ET_ERROR," Unterminated /* comment" ); }
309+ <xc ><<EOF>> {mmerror (PARSE_ERROR, ET_ERROR," Unterminated /* comment" ); }
310310
311311<SQL >{xbitstart }{
312312BEGIN (xbit);
@@ -315,7 +315,7 @@ cppline{space}*#(.*\\{line_end})*.*
315315<xbit >{xbitstop }{
316316BEGIN (SQL);
317317if (literalbuf[strspn (literalbuf," 01" ) +1 ] !=' \0 ' )
318- mmerror (ET_ERROR," invalid bit string input." );
318+ mmerror (PARSE_ERROR, ET_ERROR," invalid bit string input." );
319319yylval.str = literalbuf;
320320return BITCONST;
321321}
@@ -328,7 +328,7 @@ cppline{space}*#(.*\\{line_end})*.*
328328<xbit >{xbitcat }{
329329/* ignore */
330330}
331- <xbit ><<EOF>> {mmerror (ET_ERROR," Unterminated bit string" ); }
331+ <xbit ><<EOF>> {mmerror (PARSE_ERROR, ET_ERROR," Unterminated bit string" ); }
332332
333333<SQL >{xhstart }{
334334BEGIN (xh);
@@ -347,12 +347,12 @@ cppline{space}*#(.*\\{line_end})*.*
347347 || val != (long ) ((int32) val)
348348#endif
349349)
350- mmerror (ET_ERROR," Bad hexadecimal integer input" );
350+ mmerror (PARSE_ERROR, ET_ERROR," Bad hexadecimal integer input" );
351351yylval.ival = val;
352352return ICONST;
353353}
354354
355- <xh ><<EOF>> {mmerror (ET_ERROR," Unterminated hexadecimal integer" ); }
355+ <xh ><<EOF>> {mmerror (PARSE_ERROR, ET_ERROR," Unterminated hexadecimal integer" ); }
356356
357357{xqstart }{
358358state_before = YYSTATE;
@@ -373,7 +373,7 @@ cppline{space}*#(.*\\{line_end})*.*
373373/* ignore */
374374}
375375
376- <xq ><<EOF>> {mmerror (ET_ERROR," Unterminated quoted string" ); }
376+ <xq ><<EOF>> {mmerror (PARSE_ERROR, ET_ERROR," Unterminated quoted string" ); }
377377
378378<SQL >{xdstart }{
379379state_before = YYSTATE;
@@ -396,7 +396,7 @@ cppline{space}*#(.*\\{line_end})*.*
396396 literalbuf, NAMEDATALEN-1 , literalbuf);
397397 literalbuf[NAMEDATALEN-1 ] =' \0 ' ;
398398#endif
399- mmerror (ET_NOTICE, errortext);
399+ mmerror (PARSE_ERROR, ET_NOTICE, errortext);
400400 }
401401
402402yylval.str =mm_strdup (literalbuf);
@@ -413,7 +413,7 @@ cppline{space}*#(.*\\{line_end})*.*
413413<xd >{xdinside }{
414414addlit (yytext, yyleng);
415415}
416- <xd ,xdc ><<EOF>> {mmerror (ET_ERROR," Unterminated quoted identifier" ); }
416+ <xd ,xdc ><<EOF>> {mmerror (PARSE_ERROR, ET_ERROR," Unterminated quoted identifier" ); }
417417{xdstart }{
418418state_before = YYSTATE;
419419BEGIN (xdc);
@@ -687,10 +687,10 @@ cppline{space}*#(.*\\{line_end})*.*
687687
688688<C ,xskip >{exec_sql }{elif }{space_or_nl }* {/* pop stack */
689689if ( preproc_tos ==0 ) {
690- mmerror (ET_FATAL," Missing matching 'EXEC SQL IFDEF / EXEC SQL IFNDEF'" );
690+ mmerror (PARSE_ERROR, ET_FATAL," Missing matching 'EXEC SQL IFDEF / EXEC SQL IFNDEF'" );
691691}
692692else if ( stacked_if_value[preproc_tos].else_branch ) {
693- mmerror (ET_FATAL," Missing 'EXEC SQL ENDIF;'" );
693+ mmerror (PARSE_ERROR, ET_FATAL," Missing 'EXEC SQL ENDIF;'" );
694694}
695695else {
696696 preproc_tos--;
@@ -701,7 +701,7 @@ cppline{space}*#(.*\\{line_end})*.*
701701
702702<C ,xskip >{exec_sql }{else }{space_or_nl }* " ;" {/* only exec sql endif pops the stack, so take care of duplicated 'else' */
703703if ( stacked_if_value[preproc_tos].else_branch ) {
704- mmerror (ET_FATAL," Duplicated 'EXEC SQL ELSE;'" );
704+ mmerror (PARSE_ERROR, ET_FATAL," Duplicated 'EXEC SQL ELSE;'" );
705705}
706706else {
707707 stacked_if_value[preproc_tos].else_branch =TRUE ;
@@ -719,7 +719,7 @@ cppline{space}*#(.*\\{line_end})*.*
719719}
720720<C ,xskip >{exec_sql }{endif }{space_or_nl }* " ;" {
721721if ( preproc_tos ==0 ) {
722- mmerror (ET_FATAL," Unmatched 'EXEC SQL ENDIF;'" );
722+ mmerror (PARSE_ERROR, ET_FATAL," Unmatched 'EXEC SQL ENDIF;'" );
723723}
724724else {
725725 preproc_tos--;
@@ -737,7 +737,7 @@ cppline{space}*#(.*\\{line_end})*.*
737737
738738<xcond >{identifier }{space_or_nl }* " ;" {
739739if ( preproc_tos >= MAX_NESTED_IF-1 ) {
740- mmerror (ET_FATAL," Too many nested 'EXEC SQL IFDEF' conditions" );
740+ mmerror (PARSE_ERROR, ET_FATAL," Too many nested 'EXEC SQL IFDEF' conditions" );
741741}
742742else {
743743struct _defines *defptr;
@@ -864,7 +864,7 @@ cppline{space}*#(.*\\{line_end})*.*
864864if ( preproc_tos >0 ) {
865865 preproc_tos =0 ;
866866
867- mmerror (ET_FATAL," Missing 'EXEC SQL ENDIF;'" );
867+ mmerror (PARSE_ERROR, ET_FATAL," Missing 'EXEC SQL ENDIF;'" );
868868 }
869869
870870if (yy_buffer ==NULL )