mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
Third try. Sorry, I had a wrong path in my copy statement.
This commit is contained in:
parent
c823b1eedc
commit
df8789bb15
@ -9,6 +9,7 @@ PATCHLEVEL=0
|
||||
override CPPFLAGS+=-I$(srcdir)/../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
|
||||
-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
|
||||
-DINCLUDE_PATH=\"$(includedir)\"
|
||||
# -DYYDEBUG -g
|
||||
|
||||
OBJS=preproc.o pgc.o type.o ecpg.o ecpg_keywords.o output.o\
|
||||
keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o
|
||||
|
@ -22,7 +22,11 @@ static void
|
||||
usage(char *progname)
|
||||
{
|
||||
fprintf(stderr, "ecpg - the postgresql preprocessor, version: %d.%d.%d\n", MAJOR_VERSION, MINOR_VERSION, PATCHLEVEL);
|
||||
fprintf(stderr, "Usage: %s: [-v] [-t] [-I include path] [ -o output file name] [-D define name] file1 [file2] ...\n", progname);
|
||||
fprintf(stderr, "Usage: %s: "
|
||||
#ifdef YYDEBUG
|
||||
"[-d]"
|
||||
#endif
|
||||
" [-v] [-t] [-I include path] [ -o output file name] [-D define name] file1 [file2] ...\n", progname);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -61,7 +65,7 @@ main(int argc, char *const argv[])
|
||||
add_include_path("/usr/local/include");
|
||||
add_include_path(".");
|
||||
|
||||
while ((c = getopt(argc, argv, "vo:I:tD:")) != EOF)
|
||||
while ((c = getopt(argc, argv, "vo:I:tD:d")) != EOF)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
@ -84,6 +88,11 @@ main(int argc, char *const argv[])
|
||||
case 'D':
|
||||
add_preprocessor_define(optarg);
|
||||
break;
|
||||
#ifdef YYDEBUG
|
||||
case 'd':
|
||||
yydebug=1;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
usage(argv[0]);
|
||||
return ILLEGAL_OPTION;
|
||||
|
@ -19,6 +19,9 @@ extern char *connection;
|
||||
extern char *input_filename;
|
||||
extern char *yytext,
|
||||
errortext[128];
|
||||
#ifdef YYDEBUG
|
||||
extern int yydebug;
|
||||
#endif
|
||||
extern int yylineno,
|
||||
yyleng;
|
||||
extern FILE *yyin,
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.30 2000/09/26 11:41:44 meskes Exp $
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.31 2000/11/07 08:46:27 meskes Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -191,12 +191,12 @@ static ScanKeyword ScanKeywords[] = {
|
||||
{"only", ONLY},
|
||||
{"operator", OPERATOR},
|
||||
{"option", OPTION},
|
||||
{"overlaps", OVERLAPS},
|
||||
{"owner", OWNER},
|
||||
{"or", OR},
|
||||
{"order", ORDER},
|
||||
{"out", OUT},
|
||||
{"outer", OUTER_P},
|
||||
{"overlaps", OVERLAPS},
|
||||
{"owner", OWNER},
|
||||
{"partial", PARTIAL},
|
||||
{"password", PASSWORD},
|
||||
{"path", PATH_P},
|
||||
|
@ -375,6 +375,8 @@ make_name(void)
|
||||
%type <index> opt_array_bounds opt_type_array_bounds
|
||||
|
||||
%type <ival> Iresult
|
||||
|
||||
%token YYERROR_VERBOSE
|
||||
%%
|
||||
prog: statements;
|
||||
|
||||
@ -5272,6 +5274,7 @@ c_anything: IDENT { $$ = $1; }
|
||||
| S_LSHIFT { $$ = make_str("<<"); }
|
||||
| S_MEMBER { $$ = make_str("->"); }
|
||||
| S_MEMPOINT { $$ = make_str("->*"); }
|
||||
| S_MOD { $$ = make_str("%="); }
|
||||
| S_MUL { $$ = make_str("*="); }
|
||||
| S_NEQUAL { $$ = make_str("!="); }
|
||||
| S_OR { $$ = make_str("||"); }
|
||||
@ -5311,7 +5314,9 @@ blockend : '}'
|
||||
|
||||
%%
|
||||
|
||||
void yyerror(char * error)
|
||||
{
|
||||
mmerror(ET_ERROR, error);
|
||||
void yyerror( char * error)
|
||||
{ char buf[1024];
|
||||
snprintf(buf,sizeof buf,"%s at or near \"%s\"",error,yytext);
|
||||
buf[sizeof(buf)-1]=0;
|
||||
mmerror(ET_ERROR, buf);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user