From b19fd9d8772824d12d33a3236710a9b6e96bda76 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 10 Sep 2012 15:35:49 +0100 Subject: clean up parser warnings --- src/genjsbind-parser.y | 7 ++++++- src/jsapi-libdom.c | 1 - src/webidl-ast.h | 5 ++++- src/webidl-parser.y | 23 +++++++++++++++++++++-- 4 files changed, 31 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/genjsbind-parser.y b/src/genjsbind-parser.y index 17d1850..98ae18a 100644 --- a/src/genjsbind-parser.y +++ b/src/genjsbind-parser.y @@ -19,6 +19,8 @@ char *errtxt; static void genjsbind_error(YYLTYPE *locp, struct genbind_node **genbind_ast, const char *str) { + locp = locp; + genbind_ast = genbind_ast; errtxt = strdup(str); } @@ -71,7 +73,10 @@ char *errtxt; Input : - Statements { *genbind_ast = $1 } + Statements + { + *genbind_ast = $1; + } ; diff --git a/src/jsapi-libdom.c b/src/jsapi-libdom.c index c925ef9..d1ac37c 100644 --- a/src/jsapi-libdom.c +++ b/src/jsapi-libdom.c @@ -57,7 +57,6 @@ static int webidl_hdrcomments_cb(struct genbind_node *node, void *ctx) static int webidl_hdrcomment_cb(struct genbind_node *node, void *ctx) { - FILE *outfile = ctx; genbind_node_for_each_type(genbind_node_getnode(node), GENBIND_NODE_TYPE_STRING, webidl_hdrcomments_cb, diff --git a/src/webidl-ast.h b/src/webidl-ast.h index 3c93305..6c61de9 100644 --- a/src/webidl-ast.h +++ b/src/webidl-ast.h @@ -9,7 +9,10 @@ #ifndef genjsbind_webidl_ast_h #define genjsbind_webidl_ast_h -#define WEBIDL_NODE_TYPE_ROOT 0 +enum webidl_node_type { + WEBIDL_NODE_TYPE_ROOT = 0, + +}; struct webidl_node { int type; diff --git a/src/webidl-parser.y b/src/webidl-parser.y index b45a8bd..c6d981f 100644 --- a/src/webidl-parser.y +++ b/src/webidl-parser.y @@ -107,10 +107,20 @@ webidl_error(YYLTYPE *locp, struct webidl_node **winbind_ast, const char *str) %token TOK_JAVADOC %type Inheritance -%type InterfaceMembers %type Definitions %type Definition +%type Partial +%type Dictionary +%type Exception +%type Enum +%type Typedef +%type ImplementsStatement +%type Interface +%type InterfaceMembers +%type CallbackOrInterface +%type CallbackRest +%type CallbackRestOrInterface %% @@ -158,8 +168,12 @@ Definition: ; /* [3] */ -CallbackOrInterface: +CallbackOrInterface + : TOK_CALLBACK CallbackRestOrInterface + { + $$ = $2; + } | Interface ; @@ -175,6 +189,7 @@ CallbackRestOrInterface: Interface: TOK_INTERFACE TOK_IDENTIFIER Inheritance '{' InterfaceMembers '}' ';' { + $$ = NULL; } ; @@ -296,6 +311,10 @@ EnumValues: /* [23] - bug in w3c grammar? it doesnt list the equals as a terminal */ CallbackRest: TOK_IDENTIFIER '=' ReturnType '(' ArgumentList ')' ';' + { + $$ = NULL; + } + ; /* [24] */ Typedef: -- cgit v1.2.3