Community
Participate
Working Groups
The DOT grammar specifies the following for quoted strings: -"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 character. In addition, double-quoted strings can be concatenated using a '+' operator." For html strings that does not hold: -"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." Further, C preprocessor directives are allowed: -"In addition, a line beginning with a '#' character is considered a line output from a C preprocessor (e.g., # 34 to indicate line 34 ) and discarded." We need to ensure the DOT grammar follows these conventions properly.
I opened bug #508870 to handle the html string property (not containing escaped newlines) mentioned in comment #1, so we can deal with quoted strings here alone.
Currently, escaped newlines are handled within DotExecutableUtils#read(InputStream) which is unsufficient for the parsing of attributes (e.g. a "pos" containing a backslash cannot be parsed). To properly handle escaped newlines, removal of the backslash and the newline should be performed within ID#decode(String, Type) when decoding a quoted string.
Moved newline concatenation from DotExecutableUtils to ID, where it seems to be more appropriate. What remains to be done here is support for concatenation of quoted strings (using '+') as well as c-preprocessor comments ('#').