vala r860 - in trunk: . gobject-introspection



Author: juergbi
Date: Fri Jan 18 22:17:00 2008
New Revision: 860
URL: http://svn.gnome.org/viewvc/vala?rev=860&view=rev

Log:
2008-01-18  Juerg Billeter  <j bitron ch>

	* gobject-introspection/gidlparser.c,
	  gobject-introspection/scannerlexer.l,
	  gobject-introspection/scannerparser.y: support C99 _Bool type


Modified:
   trunk/ChangeLog
   trunk/gobject-introspection/gidlparser.c
   trunk/gobject-introspection/scannerlexer.l
   trunk/gobject-introspection/scannerparser.y

Modified: trunk/gobject-introspection/gidlparser.c
==============================================================================
--- trunk/gobject-introspection/gidlparser.c	(original)
+++ trunk/gobject-introspection/gidlparser.c	Fri Jan 18 22:17:00 2008
@@ -92,6 +92,7 @@
   } basic[] = {
     { "void",     TYPE_TAG_VOID,    0 },
     { "gpointer", TYPE_TAG_VOID,    1 },
+    { "bool",     TYPE_TAG_BOOLEAN, 0 },
     { "gboolean", TYPE_TAG_BOOLEAN, 0 },
 #if 0
     { "char",     TYPE_TAG_INT8,    0 },

Modified: trunk/gobject-introspection/scannerlexer.l
==============================================================================
--- trunk/gobject-introspection/scannerlexer.l	(original)
+++ trunk/gobject-introspection/scannerlexer.l	Fri Jan 18 22:17:00 2008
@@ -2,7 +2,7 @@
 /* GObject introspection: C lexer
  *
  * Copyright (c) 1997 Sandro Sigala  <ssigala globalnet it>
- * Copyright (c) 2007 JÃrg Billeter  <j bitron ch>
+ * Copyright (c) 2007-2008 JÃrg Billeter  <j bitron ch>
  *
  * All rights reserved.
  *
@@ -118,6 +118,7 @@
 [a-zA-Z_][a-zA-Z_0-9]*			{ if (igenerator->macro_scan) return IDENTIFIER; else REJECT; }
 
 "auto"					{ return AUTO; }
+"_Bool"					{ return BOOL; }
 "break"					{ return BREAK; }
 "case"					{ return CASE; }
 "char"					{ return CHAR; }

Modified: trunk/gobject-introspection/scannerparser.y
==============================================================================
--- trunk/gobject-introspection/scannerparser.y	(original)
+++ trunk/gobject-introspection/scannerparser.y	Fri Jan 18 22:17:00 2008
@@ -1,7 +1,7 @@
 /* GObject introspection: C parser
  *
  * Copyright (c) 1997 Sandro Sigala  <ssigala globalnet it>
- * Copyright (c) 2007 JÃrg Billeter  <j bitron ch>
+ * Copyright (c) 2007-2008 JÃrg Billeter  <j bitron ch>
  *
  * All rights reserved.
  *
@@ -209,7 +209,7 @@
 %token ELLIPSIS ADDEQ SUBEQ MULEQ DIVEQ MODEQ XOREQ ANDEQ OREQ SL SR
 %token SLEQ SREQ EQ NOTEQ LTEQ GTEQ ANDAND OROR PLUSPLUS MINUSMINUS ARROW
 
-%token AUTO BREAK CASE CHAR CONST CONTINUE DEFAULT DO DOUBLE ELSE ENUM
+%token AUTO BOOL BREAK CASE CHAR CONST CONTINUE DEFAULT DO DOUBLE ELSE ENUM
 %token EXTERN FLOAT FOR GOTO IF INLINE INT LONG REGISTER RESTRICT RETURN SHORT
 %token SIGNED SIZEOF STATIC STRUCT SWITCH TYPEDEF UNION UNSIGNED VOID VOLATILE
 %token WHILE
@@ -787,6 +787,10 @@
 	  {
 		$$ = cbasic_type_new ("unsigned");
 	  }
+	| BOOL
+	  {
+		$$ = cbasic_type_new ("bool");
+	  }
 	| struct_or_union_specifier
 	| enum_specifier
 	| typedef_name



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]