X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Fmetadata%2Fctf-parser.y;h=d0866ffb5c03591689c714d6ff8b2c1b2b28ed05;hb=f3985ab106d89d8e764c1a8dd0c8bda09b755d10;hp=61ab4f588ca25c31df5cf31ff9b2a7c896ff504e;hpb=cb2f43eea2515ca1d2d97e24cbb067f7804a651c;p=babeltrace.git diff --git a/formats/ctf/metadata/ctf-parser.y b/formats/ctf/metadata/ctf-parser.y index 61ab4f58..d0866ffb 100644 --- a/formats/ctf/metadata/ctf-parser.y +++ b/formats/ctf/metadata/ctf-parser.y @@ -330,7 +330,7 @@ static int lookup_type(struct ctf_scanner_scope *s, const char *id) { int ret; - ret = (int) (long) g_hash_table_lookup(s->types, id); + ret = GPOINTER_TO_INT(g_hash_table_lookup(s->types, id)); printf_debug("lookup %p %s %d\n", s, id, ret); return ret; } @@ -1025,6 +1025,8 @@ void ctf_scanner_free(struct ctf_scanner *scanner) { int ret; + if (!scanner) + return; finalize_scope(&scanner->root_scope); objstack_destroy(scanner->objstack); ret = yylex_destroy(scanner->scanner); @@ -1249,6 +1251,15 @@ postfix_expression: bt_list_splice(&($1)->tmp_head, &($$)->tmp_head); bt_list_add_tail(&($$)->siblings, &($$)->tmp_head); } + | postfix_expression DOT keywords + { + $$ = make_node(scanner, NODE_UNARY_EXPRESSION); + $$->u.unary_expression.type = UNARY_STRING; + $$->u.unary_expression.u.string = yylval.s; + $$->u.unary_expression.link = UNARY_DOTLINK; + bt_list_splice(&($1)->tmp_head, &($$)->tmp_head); + bt_list_add_tail(&($$)->siblings, &($$)->tmp_head); + } | postfix_expression RARROW IDENTIFIER { $$ = make_node(scanner, NODE_UNARY_EXPRESSION);