summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent Sanders <vincent.sanders@collabora.co.uk>2012-09-10 15:35:49 +0100
committerVincent Sanders <vincent.sanders@collabora.co.uk>2012-09-10 15:35:49 +0100
commitb19fd9d8772824d12d33a3236710a9b6e96bda76 (patch)
treef4ed3e9c17693d66822303d064d8560ed840aa96 /src
parent751839d208b02af3d0a2329e6d75a90d51a247ff (diff)
downloadnsgenbind-b19fd9d8772824d12d33a3236710a9b6e96bda76.tar.gz
nsgenbind-b19fd9d8772824d12d33a3236710a9b6e96bda76.tar.bz2
clean up parser warnings
Diffstat (limited to 'src')
-rw-r--r--src/genjsbind-parser.y7
-rw-r--r--src/jsapi-libdom.c1
-rw-r--r--src/webidl-ast.h5
-rw-r--r--src/webidl-parser.y23
4 files changed, 31 insertions, 5 deletions
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 <text> TOK_JAVADOC
%type <text> Inheritance
-%type <ifmember> InterfaceMembers
%type <node> Definitions
%type <node> Definition
+%type <node> Partial
+%type <node> Dictionary
+%type <node> Exception
+%type <node> Enum
+%type <node> Typedef
+%type <node> ImplementsStatement
+%type <node> Interface
+%type <node> InterfaceMembers
+%type <node> CallbackOrInterface
+%type <node> CallbackRest
+%type <node> 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: