Compatibility issue with GraphViz 2.30


When using GraphViz 2.28 there is no problem, but when using Graphviz 2.30.1 the output of "dot.exe -Tdot" format is indented differently especially for node/edges attributes. This new indentation creates an exception of type 'Antlr.Runtime.MismatchedTokenException'.

I am using the head of source code (no fork): commit 1c7e5050cb20, août 31, 2012
Tested on VS2012 on Win7 64 and Win8 64

The root of the problems comes from Graphviz4Net.Core\Dot\AntlrParser\Generated\DotGrammarParser.cs line 759, probably because of an incorrect DotGrammar.g that does not handle the indentation of attributes.

I have tried to solve the grammar with no success (I'm new to ANTLR...), therefore I've attached the value of the ITokenStream input variable's state in DotGrammarParser.cs in line 759, this showing the difference of indentation between Graphviz 2.28 and 2.30

file attachments


stevesindelar wrote May 2, 2013 at 5:44 PM

Thank you for reporting this. I will have a look into it as soon as my schedule allows.

stevesindelar wrote May 4, 2013 at 11:15 PM

It is fixed in the last commit (b19bb0cdc8c6,).

They are not quoting numbers with decimal point that are a value of some attribute (i.e. size=12.5 instead of size="12.5"), which is imho not consistent with the DOT grammar specification...