Commit f17d23de authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

support C99 _Bool type

2008-01-18  Juerg Billeter  <j@bitron.ch>

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

svn path=/trunk/; revision=860
parent a980f1c9
2008-01-18 Jürg Billeter <j@bitron.ch>
* gobject-introspection/gidlparser.c,
gobject-introspection/scannerlexer.l,
gobject-introspection/scannerparser.y: support C99 _Bool type
2008-01-18 Jürg Billeter <j@bitron.ch>
* vala/scanner.l: support nested generic types, fixes bug 443522
......
......@@ -92,6 +92,7 @@ parse_type_internal (gchar *str, gchar **rest)
} 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 },
......
......@@ -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 @@ stringtext ([^\"])|(\\.)
[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; }
......
/* 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 @@ cdirective_free (CDirective *directive)
%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 @@ type_specifier
{
$$ = cbasic_type_new ("unsigned");
}
| BOOL
{
$$ = cbasic_type_new ("bool");
}
| struct_or_union_specifier
| enum_specifier
| typedef_name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment