From: Jérémie Galarneau Date: Thu, 2 Jul 2015 18:46:06 +0000 (-0400) Subject: Fix: Missing postfix_expression DOT keywords in CTF grammar X-Git-Tag: v1.3.0~45 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=3f4bae2a85a43606999ca7e701dcc9a493352ed3;ds=sidebyside Fix: Missing postfix_expression DOT keywords in CTF grammar This would cause expressions of the form: uint32_t a[stream.event.header.seq_len] to fail to parse since two keywords (stream and event) are used in the path. Signed-off-by: Jérémie Galarneau --- diff --git a/formats/ctf/metadata/ctf-parser.y b/formats/ctf/metadata/ctf-parser.y index 68fde931..821f0f74 100644 --- a/formats/ctf/metadata/ctf-parser.y +++ b/formats/ctf/metadata/ctf-parser.y @@ -1251,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);