A lot of redundant code is introduced in the C parser due to additional productions for end attributes. Add an end_attributes_opt rule to resolve this.
Signed-off-by: Jaskaran Singh <[email protected]> --- parsing_c/parser_c.mly | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/parsing_c/parser_c.mly b/parsing_c/parser_c.mly index effd0727..78407844 100644 --- a/parsing_c/parser_c.mly +++ b/parsing_c/parser_c.mly @@ -2542,6 +2542,10 @@ end_attribute_list: end_attributes: end_attribute_list { $1 } +end_attributes_opt: + | end_attributes { $1 } + | /*(* empty *)*/ { [] } + comma_opt: | TComma { [$1] } | /*(* empty *)*/ { [] } -- 2.21.1 _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
