]> granicus.if.org Git - graphviz/commitdiff
cgraph: remove unimplemented 'attrmacro' in the grammar
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 17 Dec 2022 18:53:23 +0000 (10:53 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 17 Dec 2022 18:59:35 +0000 (10:59 -0800)
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.

lib/cgraph/grammar.y

index e124956f5cd2528b73d719bf0b54df0d837519c5..8aedcc1581bfb9f7e7929d9712d849313972d7eb 100644 (file)
@@ -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
                        ;