Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dot parser doesn't allow for #36

Closed
GoogleCodeExporter opened this issue Apr 13, 2015 · 3 comments
Closed

Dot parser doesn't allow for #36

GoogleCodeExporter opened this issue Apr 13, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create the following Dot file:
digraph {
    a -> b[label="hi", decorate];   
}
(The validity of this graph can be verified by running Dot on it.)

2. Run  pydot.dot_parser.graph_definition().parseFile('/path/to/file.dot')

PyDot complains, 'ParseException: Expected "}" (at char 24), (line:2, col:15).'

This issue appears to be caused by an erroneous assumption in the P_AttrList 
class that attributes always appear in name/value pairs. 

I'm using the latest release of PyDot on Scientific Linux with Python 2.5.1.

I have provided a patch to fix this problem; it merely prevents suppression of 
the '=' character in attribute lists and uses that in P_AttrList construction 
to determine which attributes have values and which do not.

Original issue reported on code.google.com by yavy...@gmail.com on 2 Jul 2010 at 6:33

Attachments:

johnyf pushed a commit that referenced this issue May 10, 2016
There was some differences between how pydot quotes IDs (names, attrs)
and how it is defined in DOT language specification (and how pygraphviz
does it).
New test with covered cases has been added and new regexpes
for checking IDs has been also added.
Fixes #36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant