~ubuntu-branches/ubuntu/trusty/postgresql-8.4/trusty

« back to all changes in this revision

Viewing changes to src/interfaces/ecpg/preproc/preproc.y

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* header */
2
 
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.5 2009/01/23 12:43:32 petere Exp $ */
 
2
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.7 2009/06/10 23:11:52 petere Exp $ */
3
3
 
4
4
/* Copyright comment */
5
5
%{
24
24
#define base_yylex filtered_base_yylex
25
25
 
26
26
/*
 
27
 * This is only here so the string gets into the POT.  Bison uses it
 
28
 * internally.
 
29
 */
 
30
#define bison_gettext_dummy gettext_noop("syntax error")
 
31
 
 
32
/*
27
33
 * Variables containing simple states.
28
34
 */
29
35
int struct_level = 0;
57
63
 * Handle parsing errors and warnings
58
64
 */
59
65
void
60
 
mmerror(int error_code, enum errortype type, char * error, ...)
 
66
mmerror(int error_code, enum errortype type, const char *error, ...)
61
67
{
62
68
        va_list ap;
63
69
 
3615
3621
 { 
3616
3622
 $$ = $1;
3617
3623
}
3618
 
|  TriggerOneEvent OR TriggerOneEvent
 
3624
|  TriggerEvents OR TriggerOneEvent
3619
3625
 { 
3620
3626
 $$ = cat_str(3,$1,make_str("or"),$3);
3621
3627
}
3622
 
|  TriggerOneEvent OR TriggerOneEvent OR TriggerOneEvent
3623
 
 { 
3624
 
 $$ = cat_str(5,$1,make_str("or"),$3,make_str("or"),$5);
3625
 
}
3626
3628
;
3627
3629
 
3628
3630
 
9931
9933
 
9932
9934
 
9933
9935
/* trailer */
9934
 
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.trailer,v 1.7 2009/04/06 08:42:53 heikki Exp $ */
 
9936
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.trailer,v 1.9 2009/06/10 23:11:52 petere Exp $ */
9935
9937
 
9936
9938
statements: /*EMPTY*/
9937
9939
                | statements statement
11918
11920
 
11919
11921
%%
11920
11922
 
11921
 
void base_yyerror(const char * error)
 
11923
void base_yyerror(const char *error)
11922
11924
{
11923
 
        char buf[1024];
11924
 
 
11925
 
        snprintf(buf,sizeof buf, _("%s at or near \"%s\""), error, token_start ? token_start : yytext);
11926
 
        buf[sizeof(buf)-1]=0;
11927
 
        mmerror(PARSE_ERROR, ET_ERROR, buf);
 
11925
        /* translator: %s is typically the translation of "syntax error" */
 
11926
        mmerror(PARSE_ERROR, ET_ERROR, "%s at or near \"%s\"",
 
11927
                        _(error), token_start ? token_start : yytext);
11928
11928
}
11929
11929
 
11930
11930
void parser_init(void)