A few attribute centric productions cause a lot of duplicate code. Add an 'end_attributes_opt' rule to dispel duplicate code caused by an additional attribute centric productions.
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 e4352a61..443ac59f 100644 --- a/parsing_c/parser_c.mly +++ b/parsing_c/parser_c.mly @@ -2408,6 +2408,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
