pombreda / pydot

Automatically exported from code.google.com/p/pydot
MIT License
0 stars 0 forks source link

pydot 1.0.4 does not parse graph node with "."(dot) in it #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. in file test.dot, add a node with "." eg 2.3 [label="dot_node"] 
2. pydot.graph_from_dot_file(test.dot)
3. parse will fail

What is the expected output? What do you see instead?
node 2.3 will fail to parse. result in runtime exception

What version of the product are you using? On what operating system?
1.0.4 ubuntu 10.10

Possible fix:
In dot_parser.py, replace the line:
indentifier =  Word(alphanums + "_").setName("identifier")
with
indentifier =  Word(alphanums + "_" + ".").setName("identifier")

Original issue reported on code.google.com by overmin...@gmail.com on 3 Mar 2011 at 3:36

GoogleCodeExporter commented 9 years ago

Original comment by ero.carr...@gmail.com on 3 Mar 2011 at 11:54

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r22.

Original comment by ero.carr...@gmail.com on 3 Mar 2011 at 11:55

GoogleCodeExporter commented 9 years ago
Fixed in revision 22. Your suggested fix works and does not cause problems in 
the regression tests

Original comment by ero.carr...@gmail.com on 3 Mar 2011 at 11:56