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

Bug 430132

Summary: DOT node groups don't work
Product: [Tools] GEF Reporter: Oliver Suciu <osuciu>
Component: GEF GraphAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Oliver Suciu CLA 2014-03-11 14:48:55 EDT
gef4.graph.ui appears to throw this

DOT parser doesn't seem to accept this form:
digraph { 
 foo -> { bar baz }
}

(It's legal DOT syntax though)

---

eclipse.buildId=4.3.2.M20140221-1700
java.version=1.7.0_40
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.standard.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.standard.product

Error
Tue Mar 11 11:28:47 PDT 2014
Could not import DOT: [null 1: missing '}' at 'digraph' , null 8: mismatched input '->' expecting '}' ], DOT: digraph s{ 
 n1[label="Node 1"]; n2[label="Node 2"]; 
 n1 -> n2[style=dotted label="A dotted edge"]
 n1 -> n4
 n2 -> n3
 n3 -> n5
 n4 -> n5
 foo -> { bar baz }
}
Comment 1 Alexander Nyßen CLA 2014-11-07 03:08:44 EST
There are two problems here: 

1) the grammar does not allow subgraph names to be optional (which causes the first example to fail)
2) there seems to be a conflict between the ID terminal rule and the enum data type rules (we run into problems as soon as the 'id' of the graph matches any of the enum literals; here, "s" matches the 'south' literal of CompassPt).
Comment 2 Alexander Nyßen CLA 2014-11-07 04:35:11 EST
Fixed the following issues:

- Ensured sugraph names are now optional. 
- Added missing "c" and "_" literals to CompassPt enum.
- Ensured that CompassPt literal values can be used within IDs.

Added 2 test cases (idMatchesKeyword, nodeGroupsGraph) to verify the now correct behavior. 

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