ctf.fs: bt_ctf_notif_iter_create(): assert() that all medops exist
[babeltrace.git] / formats / ctf / metadata / ctf-parser.y
index 61ab4f588ca25c31df5cf31ff9b2a7c896ff504e..d0866ffb5c03591689c714d6ff8b2c1b2b28ed05 100644 (file)
@@ -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);
This page took 0.023782 seconds and 4 git commands to generate.