Re: [graphviz-interest] A question about formatting DOT files

"Emden R. Gansner" <[email protected]> Fri, 07 Nov 2014 12:26:56 -0500
Newsgroups gmane.comp.video.graphviz
Message-ID <[email protected]>
On 11/6/14 7:45 PM, Ron Savage wrote:
> So, finally, the question is: Are there any (other) cases where 
> replacing all (non-escaped) newlines with a single space would change 
> dot's interpretation? 
In terms of parsing, no.
In terms of basic lexical analysis, a newline character or a space would 
serve equally well to terminate or separate tokens.
The only tricky part deals with comments. Both the // comment and the # 
comment go until a newline character is encountered.
Assuming you first remove all comments, and correctly handle escaped 
newlines within "..." strings and unescaped newlines within
<...> strings during lexing, all other newlines could be replaced with 
spaces without affecting the semantics.

     Emden

_______________________________________________
[email protected]
http://lists.research.att.com/mailman/listinfo/graphviz-interest