antlr / grammars-v4

Grammars written for ANTLR v4; expectation that the grammars are free of actions.
MIT License
10.22k stars 3.71k forks source link

[dot] Fix semicolon as attribute list separator #4273

Closed dundalek closed 1 month ago

dundalek commented 1 month ago

Attributes in Graphviz can be separated not only by comma, but also a semicolon.

Example of a dot file that currently fails to parse, but works with graphviz dot -Tsvg g.dot > g.svg:

graph {
  A [color=blue; shape=hexagon]
}

Matching rule in DOT language grammar:

grammar.png

teverett commented 1 month ago

@dundalek thanks!