From: Matthew Fernandez Date: Sat, 17 Dec 2022 18:53:23 +0000 (-0800) Subject: cgraph: remove unimplemented 'attrmacro' in the grammar X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33f8b84b32106ce36d1f65aa1d767c2342ac6e0d;p=graphviz cgraph: remove unimplemented 'attrmacro' in the grammar Parsing this entity would result in calling `appendattr` in a way that failed an assertion. Thankfully it is unimplemented, so this is unreachable. However, it is also not practical anymore to implement this. The lexer (lib/cgraph/scan.l) treats `@` as an end-of-file marker. So future modifications to the DOT language to interpret `@` as an attribute macro would break a lot of existing things. --- diff --git a/lib/cgraph/grammar.y b/lib/cgraph/grammar.y index e124956f5..8aedcc158 100644 --- a/lib/cgraph/grammar.y +++ b/lib/cgraph/grammar.y @@ -168,14 +168,11 @@ optattrdefs : optattrdefs attrdefs attrdefs : attritem optseparator ; -attritem : attrassignment | attrmacro ; +attritem : attrassignment; attrassignment : atom '=' atom {appendattr($1,$3);} ; -attrmacro : '@' atom {appendattr($2,NULL);} /* not yet impl */ - ; - graphattrdefs : attrassignment ;