I don’t have a lot of context for this (what is GraphStream?), but you are right that the Graphviz parsing logic is forgiving to a fault. It attempts to continue in the face of almost anything and everything. You can see this in the Gitlab issues filed by Google Autofuzz. The parser will continue in the face of things like invalid unicode and then crash rather noisily.
I’ve been meaning to enumerate these cases and turn them into hard exits. This isn’t great behavior in library code, but it’s better than attempting to continue with a garbage input stream.
Note that the grammar as described on the website is also not exactly what the implementation accepts. The implementation is much more loose, in ways that probably should be examined and rethought.