aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/ChangeLog3
-rw-r--r--src/interfaces/ecpg/preproc/pgc.l13
-rw-r--r--src/interfaces/ecpg/preproc/preproc.y17
3 files changed, 30 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog
index 00befad7ff4..99f6f26355e 100644
--- a/src/interfaces/ecpg/ChangeLog
+++ b/src/interfaces/ecpg/ChangeLog
@@ -982,5 +982,8 @@ Sun Oct 22 15:35:53 CEST 2000
- Fixed typos in descriptor.c.
+Wed Oct 25 08:53:07 CEST 2000
+
+ - Added some more C constructs to the parser.
- Set ecpg version to 2.8.0.
- Set library version to 3.2.0.
diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l
index 08457d4b083..d6b4b28dff9 100644
--- a/src/interfaces/ecpg/preproc/pgc.l
+++ b/src/interfaces/ecpg/preproc/pgc.l
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.65 2000/10/17 15:38:25 meskes Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.66 2000/10/25 07:00:33 meskes Exp $
*
*-------------------------------------------------------------------------
*/
@@ -681,6 +681,17 @@ cppline {space}*#(.*\\{line_end})*.*
<C>"<<" { return(S_LSHIFT); }
<C>"||" { return(S_OR); }
<C>"&&" { return(S_AND); }
+<C>"++" { return(S_INC); }
+<C>"--" { return(S_DEC); }
+<C>"==" { return(S_EQUAL); }
+<C>"!=" { return(S_NEQUAL); }
+<C>"+=" { return(S_ADD); }
+<C>"-=" { return(S_SUB); }
+<C>"*=" { return(S_MUL); }
+<C>"/=" { return(S_DIV); }
+<C>"%=" { return(S_MOD); }
+<C>"->*" { return(S_MEMPOINT); }
+<C>".*" { return(S_DOTPOINT); }
<C>{other} { return S_ANYTHING; }
<C>{exec_sql}{define}{space_or_nl}* { BEGIN(def_ident); }
diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y
index 9e6eaaa09aa..895b1b2cfe8 100644
--- a/src/interfaces/ecpg/preproc/preproc.y
+++ b/src/interfaces/ecpg/preproc/preproc.y
@@ -174,8 +174,10 @@ make_name(void)
%token SQL_VALUE SQL_VAR SQL_WHENEVER
/* C token */
-%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
+%token S_ADD S_AND S_ANYTHING S_AUTO S_CONST S_DEC S_DIV S_DOTPOINT
+%token S_EQUAL S_EXTERN S_INC S_LSHIFT
+%token S_MEMPOINT S_MEMBER S_MOD S_MUL S_NEQUAL S_OR
+%token S_REGISTER S_RSHIFT S_STATIC S_SUB S_VOLATILE
/* I need this and don't know where it is defined inside the backend */
%token TYPECAST
@@ -5298,17 +5300,28 @@ c_anything: IDENT { $$ = $1; }
| '-' { $$ = make_str("-"); }
| '/' { $$ = make_str("/"); }
| '%' { $$ = make_str("%"); }
+ | NULL_P { $$ = make_str("NULL"); }
+ | S_ADD { $$ = make_str("+="); }
| S_AND { $$ = make_str("&&"); }
| S_ANYTHING { $$ = make_name(); }
| S_AUTO { $$ = make_str("auto"); }
| S_CONST { $$ = make_str("const"); }
+ | S_DEC { $$ = make_str("--"); }
+ | S_DIV { $$ = make_str("/="); }
+ | S_DOTPOINT { $$ = make_str(".*"); }
+ | S_EQUAL { $$ = make_str("=="); }
| S_EXTERN { $$ = make_str("extern"); }
+ | S_INC { $$ = make_str("++"); }
| S_LSHIFT { $$ = make_str("<<"); }
| S_MEMBER { $$ = make_str("->"); }
+ | S_MEMPOINT { $$ = make_str("->*"); }
+ | S_MUL { $$ = make_str("*="); }
+ | S_NEQUAL { $$ = make_str("!="); }
| S_OR { $$ = make_str("||"); }
| S_REGISTER { $$ = make_str("register"); }
| S_RSHIFT { $$ = make_str(">>"); }
| S_STATIC { $$ = make_str("static"); }
+ | S_SUB { $$ = make_str("-="); }
| SQL_BOOL { $$ = make_str("bool"); }
| SQL_ENUM { $$ = make_str("enum"); }
| SQL_INT { $$ = make_str("int"); }