[graphviz-interest] A question about formatting DOT files
Ron Savage <[email protected]> Fri, 07 Nov 2014 11:45:18 +1100
| Newsgroups | gmane.comp.video.graphviz |
|---|---|
| Message-ID | <[email protected]> |
Hi All I wish to discuss the possibility of reformatting DOT files without any change in how dot interprets them. I ask because I'm writing a parser for DOT files, and that substitution would definitely make parsing easier, since it would allow the author of the file to format however they liked (esp. HTML), and yet simplify the parser at the same time. Since there is an escape sequence - \n - for output newlines, let's ignore the character sequence '\n'. Also, for the moment I'd like to ignore this statement from the docs (http://www.graphviz.org/content/dot-language): "As another aid for readability, dot allows double-quoted strings to span multiple physical lines using the standard C convention of a backslash immediately preceding a newline character2. In addition, double-quoted strings can be concatenated using a '+' operator. As HTML strings can contain newline characters, which are used solely for formatting, the language does not allow escaped newlines or concatenation operators to be used within them." In fact, that statement may well not restrict the code I'm writing. 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? -- Ron Savage - savage.net.au _______________________________________________ [email protected] http://lists.research.att.com/mailman/listinfo/graphviz-interest