Tue Oct 17 08:09:16 CEST 2000
- - Simplified parsing ofr connect rule.
+ - Simplified parsing of connect rule.
+
+Tue Oct 17 17:36:30 CEST 2000
+
+ - Fixed some bugs in C language parsing.
- Set ecpg version to 2.8.0.
- Set library version to 3.2.0.
remove space_or_nl and line_end from pgc.l
+nested C comments do not work
+
Missing features:
- SQLSTATE
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.64 2000/09/26 11:41:44 meskes Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.65 2000/10/17 15:38:25 meskes Exp $
*
*-------------------------------------------------------------------------
*/
<C>\[ { return('['); }
<C>\] { return(']'); }
<C>\= { return('='); }
+<C>"->" { return(S_MEMBER); }
+<C>">>" { return(S_RSHIFT); }
+<C>"<<" { return(S_LSHIFT); }
+<C>"||" { return(S_OR); }
+<C>"&&" { return(S_AND); }
<C>{other} { return S_ANYTHING; }
<C>{exec_sql}{define}{space_or_nl}* { BEGIN(def_ident); }
%token SQL_VALUE SQL_VAR SQL_WHENEVER
/* C token */
-%token S_ANYTHING S_AUTO S_CONST S_EXTERN
-%token S_REGISTER S_STATIC S_VOLATILE
+%token S_AND S_ANYTHING S_AUTO S_CONST S_EXTERN S_LSHIFT
+%token S_MEMBER S_OR S_REGISTER S_RSHIFT S_STATIC S_VOLATILE
/* I need this and don't know where it is defined inside the backend */
%token TYPECAST
| '-' { $$ = make_str("-"); }
| '/' { $$ = make_str("/"); }
| '%' { $$ = make_str("%"); }
+ | S_AND { $$ = make_str("&&"); }
| S_ANYTHING { $$ = make_name(); }
| S_AUTO { $$ = make_str("auto"); }
| S_CONST { $$ = make_str("const"); }
| S_EXTERN { $$ = make_str("extern"); }
+ | S_LSHIFT { $$ = make_str("<<"); }
+ | S_MEMBER { $$ = make_str("->"); }
+ | S_OR { $$ = make_str("||"); }
| S_REGISTER { $$ = make_str("register"); }
+ | S_RSHIFT { $$ = make_str(">>"); }
| S_STATIC { $$ = make_str("static"); }
| SQL_BOOL { $$ = make_str("bool"); }
| SQL_ENUM { $$ = make_str("enum"); }
-all: test1 test2 test3 test4 perftest dyntest dyntest2 test_notice test_code100
+all: test1 test2 test3 test4 perftest dyntest dyntest2 test_notice test_code100 test_init
#LDFLAGS=-g -I /usr/local/pgsql/include -L/usr/local/pgsql/lib -lecpg -lpq
LDFLAGS=-g -I ../include -I /usr/include/postgresql -L /usr/lib -lecpg -lpq
int i=3^1;
int j=1?1:2;
-/*int e=y->member; /* compile error */
-/*int c=10>>2; /* compile error */
-/*bool h=2||1; /* compile error */
-long long iax;
+int e=y->member;
+int c=10>>2;
+bool h=2||1;
+long iay /* = 1L */ ;
+long long iax /* = 40000000000LL */ ;
exec sql end declare section;
-iax = 40000000000LL;
-
/* not working */
int f=fa();