From 3f4bae2a85a43606999ca7e701dcc9a493352ed3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 2 Jul 2015 14:46:06 -0400 Subject: [PATCH] Fix: Missing postfix_expression DOT keywords in CTF grammar MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- formats/ctf/metadata/ctf-parser.y | 9 +++++++++ 1 file changed, 9 insertions(+) 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); -- 2.34.1