Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 478660

Summary: QUOTED_STRING terminal rule does not comply to Graphviz Dot language definition.
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF DOTAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.2.0   
Target Milestone: 4.0.0 / 3.11.0 (Neon) M3   
Hardware: All   
OS: All   
Whiteboard:

Description Alexander Nyßen CLA 2015-09-29 13:41:40 EDT
The current specification of the QUOTED_STRING terminal rule (basically inspired by Xtext common terminals) does not comply to the GraphViz specification, which says:

"In quoted strings in DOT, the only escaped character is double-quote ("). That is, in quoted strings, the dyad \" is converted to "; all other characters are left unchanged. In particular, \\ remains \\. Layout engines may apply additional escape sequences."

We should adjust the QUOTED_STRING rule accordingly.
Comment 1 Alexander Nyßen CLA 2015-09-29 13:44:10 EDT
I corrected the QUOTED_STRING terminal rule into the following (so that only quotes are escaped):

terminal QUOTED_STRING:
  ('"' ('\\' '"' | !('"'))* '"');

Pushed all changes to origin/master. Resolving as fixed in 3.11.0 M3.