File tree Expand file tree Collapse file tree 6 files changed +26
-11
lines changed Expand file tree Collapse file tree 6 files changed +26
-11
lines changed Original file line number Diff line number Diff line change @@ -972,6 +972,10 @@ Mon Oct 16 21:33:17 CEST 2000
972
972
973
973
Tue Oct 17 08:09:16 CEST 2000
974
974
975
- - Simplified parsing ofr connect rule.
975
+ - Simplified parsing of connect rule.
976
+
977
+ Tue Oct 17 17:36:30 CEST 2000
978
+
979
+ - Fixed some bugs in C language parsing.
976
980
- Set ecpg version to 2.8.0.
977
981
- Set library version to 3.2.0.
Original file line number Diff line number Diff line change @@ -20,5 +20,7 @@ instead of libpq so we can write backend functions using ecpg.
20
20
21
21
remove space_or_nl and line_end from pgc.l
22
22
23
+ nested C comments do not work
24
+
23
25
Missing features:
24
26
- SQLSTATE
Original file line number Diff line number Diff line change 12
12
*
13
13
*
14
14
* IDENTIFICATION
15
- * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.64 2000/09/26 11:41:44 meskes Exp $
15
+ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.65 2000/10/17 15:38:25 meskes Exp $
16
16
*
17
17
*-------------------------------------------------------------------------
18
18
*/
@@ -676,6 +676,11 @@ cppline {space}*#(.*\\{line_end})*.*
676
676
<C >\[ { return (' [' ); }
677
677
<C >\] { return (' ]' ); }
678
678
<C >\= { return (' =' ); }
679
+ <C >" ->" { return (S_MEMBER); }
680
+ <C >" >>" { return (S_RSHIFT); }
681
+ <C >" <<" { return (S_LSHIFT); }
682
+ <C >" ||" { return (S_OR); }
683
+ <C >" &&" { return (S_AND); }
679
684
<C >{other } { return S_ANYTHING; }
680
685
681
686
<C >{exec_sql }{define }{space_or_nl }* { BEGIN (def_ident); }
Original file line number Diff line number Diff line change @@ -174,8 +174,8 @@ make_name(void)
174
174
%token SQL_VALUE SQL_VAR SQL_WHENEVER
175
175
176
176
/* C token */
177
- %token S_ANYTHING S_AUTO S_CONST S_EXTERN
178
- %token S_REGISTER S_STATIC S_VOLATILE
177
+ %token S_AND S_ANYTHING S_AUTO S_CONST S_EXTERN S_LSHIFT
178
+ %token S_MEMBER S_OR S_REGISTER S_RSHIFT S_STATIC S_VOLATILE
179
179
180
180
/* I need this and don't know where it is defined inside the backend */
181
181
%token TYPECAST
@@ -5298,11 +5298,16 @@ c_anything: IDENT { $$ = $1; }
5298
5298
| ' -' { $$ = make_str(" -" ); }
5299
5299
| ' /' { $$ = make_str(" /" ); }
5300
5300
| ' %' { $$ = make_str(" %" ); }
5301
+ | S_AND { $$ = make_str(" &&" ); }
5301
5302
| S_ANYTHING { $$ = make_name(); }
5302
5303
| S_AUTO { $$ = make_str(" auto" ); }
5303
5304
| S_CONST { $$ = make_str(" const" ); }
5304
5305
| S_EXTERN { $$ = make_str(" extern" ); }
5306
+ | S_LSHIFT { $$ = make_str(" <<" ); }
5307
+ | S_MEMBER { $$ = make_str(" ->" ); }
5308
+ | S_OR { $$ = make_str(" ||" ); }
5305
5309
| S_REGISTER { $$ = make_str(" register" ); }
5310
+ | S_RSHIFT { $$ = make_str(" >>" ); }
5306
5311
| S_STATIC { $$ = make_str(" static" ); }
5307
5312
| SQL_BOOL { $$ = make_str(" bool" ); }
5308
5313
| SQL_ENUM { $$ = make_str(" enum" ); }
Original file line number Diff line number Diff line change 1
- all : test1 test2 test3 test4 perftest dyntest dyntest2 test_notice test_code100
1
+ all : test1 test2 test3 test4 perftest dyntest dyntest2 test_notice test_code100 test_init
2
2
3
3
# LDFLAGS=-g -I /usr/local/pgsql/include -L/usr/local/pgsql/lib -lecpg -lpq
4
4
LDFLAGS =-g -I ../include -I /usr/include/postgresql -L /usr/lib -lecpg -lpq
Original file line number Diff line number Diff line change @@ -31,14 +31,13 @@ int g=fb(2);
31
31
int i=3^1;
32
32
int j=1?1:2;
33
33
34
- /*int e=y->member; /* compile error */
35
- /*int c=10>>2; /* compile error */
36
- /*bool h=2||1; /* compile error */
37
- long long iax;
34
+ int e=y->member;
35
+ int c=10>>2;
36
+ bool h=2||1;
37
+ long iay /* = 1L */ ;
38
+ long long iax /* = 40000000000LL */ ;
38
39
exec sql end declare section;
39
40
40
- iax = 40000000000LL;
41
-
42
41
/* not working */
43
42
int f=fa();
44
43
You can’t perform that action at this time.
0 commit comments