[Linux-kernel-mentees] [PATCH v2 04/25] parsing_c: parser: Add rule for multiple end attributes
Jaskaran Singh
jaskaransingh7654321 at gmail.com
Thu May 28 12:24:06 UTC 2020
There is no rule for productions of multiple end attributes. Add a case
similar to that of attribute_list for end attributes.
Signed-off-by: Jaskaran Singh <jaskaransingh7654321 at gmail.com>
---
parsing_c/parser_c.mly | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/parsing_c/parser_c.mly b/parsing_c/parser_c.mly
index bfe92e18..d259f12a 100644
--- a/parsing_c/parser_c.mly
+++ b/parsing_c/parser_c.mly
@@ -2401,8 +2401,11 @@ attribute_list:
attributes: attribute_list { $1 }
-end_attributes:
+end_attribute_list:
| TMacroEndAttr { [Attribute (fst $1), [snd $1]] }
+ | end_attribute_list TMacroEndAttr { $1 @ [Attribute(fst $2), [snd $2]] }
+
+end_attributes: end_attribute_list { $1 }
comma_opt:
| TComma { [$1] }
--
2.21.1
More information about the Linux-kernel-mentees
mailing list