aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/pgc.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/preproc/pgc.l')
-rw-r--r--src/interfaces/ecpg/preproc/pgc.l48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l
index 18cdccc7e15..be6f7b0d140 100644
--- a/src/interfaces/ecpg/preproc/pgc.l
+++ b/src/interfaces/ecpg/preproc/pgc.l
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.164 2008/05/09 15:36:31 petere Exp $
+ * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.165 2008/05/16 15:20:04 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -367,7 +367,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
<xc>{op_chars} { ECHO; }
<xc>\*+ { ECHO; }
-<xc><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated /* comment"); }
+<xc><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "unterminated /* comment"); }
<SQL>{xbstart} {
token_start = yytext;
@@ -380,7 +380,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
yyless(1);
BEGIN(SQL);
if (literalbuf[strspn(literalbuf, "01") + 1] != '\0')
- mmerror(PARSE_ERROR, ET_ERROR, "invalid bit string input.");
+ mmerror(PARSE_ERROR, ET_ERROR, "invalid bit string input");
yylval.str = mm_strdup(literalbuf);
return BCONST;
}
@@ -389,7 +389,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
<xb>{xbinside} { addlit(yytext, yyleng); }
<xh>{quotecontinue} |
<xb>{quotecontinue} { /* ignore */ }
-<xb><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated bit string"); }
+<xb><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "unterminated bit string"); }
<SQL>{xhstart} {
token_start = yytext;
@@ -405,7 +405,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
return XCONST;
}
-<xh><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated hexadecimal integer"); }
+<xh><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "unterminated hexadecimal integer"); }
<SQL>{xnstart} {
/* National character.
* Transfer it as-is to the backend.
@@ -469,7 +469,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
/* This is only needed for \ just before EOF */
addlitchar(yytext[0]);
}
-<xq,xqc,xe,xn><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted string"); }
+<xq,xqc,xe,xn><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "unterminated quoted string"); }
<SQL>{dolqfailed} {
/* throw back all but the initial "$" */
yyless(1);
@@ -530,7 +530,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
}
<xd>{xddouble} { addlitchar('"'); }
<xd>{xdinside} { addlit(yytext, yyleng); }
-<xd,xdc><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted identifier"); }
+<xd,xdc><<EOF>> { mmerror(PARSE_ERROR, ET_FATAL, "unterminated quoted identifier"); }
<C,SQL>{xdstart} {
state_before = YYSTATE;
BEGIN(xdc);
@@ -851,7 +851,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
BEGIN(C);
}
<undef>{other}|\n {
- mmerror(PARSE_ERROR, ET_FATAL, "Missing identifier in 'EXEC SQL UNDEF' command");
+ mmerror(PARSE_ERROR, ET_FATAL, "missing identifier in 'EXEC SQL UNDEF' command");
yyterminate();
}
<C>{exec_sql}{include}{space}* { BEGIN(incl); }
@@ -897,10 +897,10 @@ cppline {space}*#(.*\\{space})*.*{newline}
}
<C,xskip>{exec_sql}{elif}{space}* { /* pop stack */
if ( preproc_tos == 0 ) {
- mmerror(PARSE_ERROR, ET_FATAL, "Missing matching 'EXEC SQL IFDEF / EXEC SQL IFNDEF'");
+ mmerror(PARSE_ERROR, ET_FATAL, "missing matching 'EXEC SQL IFDEF / EXEC SQL IFNDEF'");
}
else if ( stacked_if_value[preproc_tos].else_branch )
- mmerror(PARSE_ERROR, ET_FATAL, "Missing 'EXEC SQL ENDIF;'");
+ mmerror(PARSE_ERROR, ET_FATAL, "missing 'EXEC SQL ENDIF;'");
else
preproc_tos--;
@@ -911,9 +911,9 @@ cppline {space}*#(.*\\{space})*.*{newline}
if (INFORMIX_MODE)
{
if (preproc_tos == 0)
- mmerror(PARSE_ERROR, ET_FATAL, "Missing matching 'EXEC SQL IFDEF / EXEC SQL IFNDEF'");
+ mmerror(PARSE_ERROR, ET_FATAL, "missing matching 'EXEC SQL IFDEF / EXEC SQL IFNDEF'");
else if (stacked_if_value[preproc_tos].else_branch)
- mmerror(PARSE_ERROR, ET_FATAL, "Missing 'EXEC SQL ENDIF;'");
+ mmerror(PARSE_ERROR, ET_FATAL, "missing 'EXEC SQL ENDIF;'");
else
preproc_tos--;
@@ -929,7 +929,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
<C,xskip>{exec_sql}{else}{space}*";" { /* only exec sql endif pops the stack, so take care of duplicated 'else' */
if (stacked_if_value[preproc_tos].else_branch)
- mmerror(PARSE_ERROR, ET_FATAL, "Duplicated 'EXEC SQL ELSE;'");
+ mmerror(PARSE_ERROR, ET_FATAL, "duplicated 'EXEC SQL ELSE;'");
else
{
stacked_if_value[preproc_tos].else_branch = TRUE;
@@ -948,7 +948,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
if (INFORMIX_MODE)
{
if (stacked_if_value[preproc_tos].else_branch)
- mmerror(PARSE_ERROR, ET_FATAL, "Duplicated 'EXEC SQL ELSE;'");
+ mmerror(PARSE_ERROR, ET_FATAL, "duplicated 'EXEC SQL ELSE;'");
else
{
stacked_if_value[preproc_tos].else_branch = TRUE;
@@ -970,7 +970,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
}
<C,xskip>{exec_sql}{endif}{space}*";" {
if (preproc_tos == 0)
- mmerror(PARSE_ERROR, ET_FATAL, "Unmatched 'EXEC SQL ENDIF;'");
+ mmerror(PARSE_ERROR, ET_FATAL, "unmatched 'EXEC SQL ENDIF;'");
else
preproc_tos--;
@@ -984,7 +984,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
if (INFORMIX_MODE)
{
if (preproc_tos == 0)
- mmerror(PARSE_ERROR, ET_FATAL, "Unmatched 'EXEC SQL ENDIF;'");
+ mmerror(PARSE_ERROR, ET_FATAL, "unmatched 'EXEC SQL ENDIF;'");
else
preproc_tos--;
@@ -1004,7 +1004,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
<xcond>{identifier}{space}*";" {
if (preproc_tos >= MAX_NESTED_IF-1)
- mmerror(PARSE_ERROR, ET_FATAL, "Too many nested 'EXEC SQL IFDEF' conditions");
+ mmerror(PARSE_ERROR, ET_FATAL, "too many nested 'EXEC SQL IFDEF' conditions");
else
{
struct _defines *defptr;
@@ -1037,7 +1037,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
}
<xcond>{other}|\n {
- mmerror(PARSE_ERROR, ET_FATAL, "Missing identifier in 'EXEC SQL IFDEF' command");
+ mmerror(PARSE_ERROR, ET_FATAL, "missing identifier in 'EXEC SQL IFDEF' command");
yyterminate();
}
<def_ident>{identifier} {
@@ -1046,7 +1046,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
startlit();
}
<def_ident>{other}|\n {
- mmerror(PARSE_ERROR, ET_FATAL, "Missing identifier in 'EXEC SQL DEFINE' command");
+ mmerror(PARSE_ERROR, ET_FATAL, "missing identifier in 'EXEC SQL DEFINE' command");
yyterminate();
}
<def>{space}*";" {
@@ -1079,7 +1079,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
<incl>{dquote}{xdinside}{dquote}{space}*";"? { parse_include(); }
<incl>[^;\<\>\"]+";" { parse_include(); }
<incl>{other}|\n {
- mmerror(PARSE_ERROR, ET_FATAL, "Incorrect 'EXEC SQL INCLUDE' command");
+ mmerror(PARSE_ERROR, ET_FATAL, "incorrect 'EXEC SQL INCLUDE' command");
yyterminate();
}
@@ -1089,7 +1089,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
if ( preproc_tos > 0 )
{
preproc_tos = 0;
- mmerror(PARSE_ERROR, ET_FATAL, "Missing 'EXEC SQL ENDIF;'");
+ mmerror(PARSE_ERROR, ET_FATAL, "missing 'EXEC SQL ENDIF;'");
}
yyterminate();
}
@@ -1128,7 +1128,7 @@ cppline {space}*#(.*\\{space})*.*{newline}
}
}
-<INITIAL>{other}|\n { mmerror(PARSE_ERROR, ET_FATAL, "Internal error: unreachable state, please inform pgsql-bugs@postgresql.org"); }
+<INITIAL>{other}|\n { mmerror(PARSE_ERROR, ET_FATAL, "Internal error: unreachable state, please report this to <pgsql-bugs@postgresql.org>"); }
%%
void
lex_init(void)
@@ -1250,7 +1250,7 @@ parse_include(void)
{
if (strlen(ip->path) + strlen(yytext) + 3 > MAXPGPATH)
{
- fprintf(stderr, "Error: Path %s/%s is too long in line %d, skipping.\n", ip->path, yytext, yylineno);
+ fprintf(stderr, _("Error: Path %s/%s is too long on line %d, skipping\n"), ip->path, yytext, yylineno);
continue;
}
snprintf (inc_file, sizeof(inc_file), "%s/%s", ip->path, yytext);
@@ -1266,7 +1266,7 @@ parse_include(void)
}
}
if (!yyin)
- mmerror(NO_INCLUDE_FILE, ET_FATAL, "Cannot open include file %s in line %d\n", yytext, yylineno);
+ mmerror(NO_INCLUDE_FILE, ET_FATAL, "cannot open include file \"%s\" on line %d\n", yytext, yylineno);
input_filename = mm_strdup(inc_file);
yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE ));