[BGL] Problem report - graphviz_read has syntax error for g++ 3.3.1
Hi, I hope this is the right forum to post this bug I found. If not, let me know and I'll repost. Thanks, ---------------------------------------------------------------------------- - platform : win2k boost version : 1_32_0 compiler : g++ 3.3.1 (cygming special) build : both debug and release ( static linking of graphviz library ) Symptoms: 1) Reading a digraph .dot file causes a syntax error to be emitted 2) The BGL example testcase has a false pass This problem occurred in my BGL code, but to reproduce the problem, it is easier to use the BGL example program example/graphviz.cpp, as annotated below. 1) This step runs the graphviz testcase in <boost>\libs\graph\example. Although I built both debug and released, I've retained only the relevant "release" output. | h:\vault\boost\boost_1_32_0\libs\graph\example>bjam -d2 --preserve-test-targ ets -sTOOLS=gcc -sBUILD="debug release <runtime-link>static" graphviz | ... | gcc-C++-action ..\..\..\bin\boost\libs\graph\example\graphviz.test\gcc\debug\runtime-link-s tatic\graphviz.obj | "g++" -c -Wall -ftemplate-depth-255 -g -O0 -fno-inline -I"..\..\..\bin \boost\libs\graph\example" -I "h:\vault\boost\boost_1_32_0" -o "..\..\..\bin\boost\libs\graph\example\graphviz.test\gcc\debug\runtime-link- static\graphviz.obj" "..\..\..\libs\graph\example\graphviz.cpp" | gcc-Link-action ..\..\..\bin\boost\libs\graph\example\graphviz.test\gcc\debug\runtime-link-s tatic\graphviz.exe | "g++" "-Wl,--enable-auto-image-base" -static -g -o "..\..\..\bin\boost\libs\graph\example\graphviz.test\gcc\debug\runtime-link- static\graphviz.exe" -L"../../../bin/boost/libs/graph/build/libbgl-viz.lib/ gcc/debug/runtime-link-static" "..\..\..\bin\boost\libs\graph\example\graphviz.test\gcc\debug\runtime-link- static\graphviz.obj" "..\..\..\bin\boost\libs\graph\build\libbgl-viz.lib\gcc\debug\runtime-link-s tatic\libbgl-viz.lib" "..\..\..\bin\boost\libs\graph\build\libbgl-viz.lib\gcc\debug\runtime-link-s tatic\libbgl-viz.lib" | | execute-test ..\..\..\bin\boost\libs\graph\example\graphviz.test\gcc\debug\runtime-link-s tatic\graphviz.run | ... 2) Note the **passed"" line. | **passed** ..\..\..\bin\boost\libs\graph\example\graphviz.test\gcc\debug\runtime-link-s tatic\graphviz.test | 3) This step shows running the testcase executable built above, manually, showing the syntax error emitted. | H:\vault\boost\boost_1_32_0\bin\boost\libs\graph\example\graphviz.test\gcc\r elease\runtime-link-static>graphviz ../../../../../../../../../libs/graph/example/graphviz_test.dot | graphviz ../../../../../../../../../libs/graph/example/graphviz_test.dot | This is an example to demonstrate how to read graphviz file | and how to write graph to graphviz format. | | | Usage: graphviz <input>.dot <output>.dot | If only have one xxx.dot in command line, | the second dot is graphviz_test_new.dot by default. | If there is no input and output dot file in command line, input is graphviz_test.dot and output graphviz_test_new.dot. | syntax error | 4) This step shows an equivalent VC7.1 build that runs correctly. | H:\vault\boost\boost_1_32_0\bin\boost\libs\graph\example\graphviz.test\vc-7_ 1\release\runtime-link-static>graphviz ../../../../../../../../../libs/graph/example/graphviz_test.dot | graphviz ../../../../../../../../../libs/graph/example/graphviz_test.dot | This is an example to demonstrate how to read graphviz file | and how to write graph to graphviz format. | | | Usage: graphviz <input>.dot <output>.dot | If only have one xxx.dot in command line, | the second dot is graphviz_test_new.dot by default. | If there is no input and output dot file in command line, input is graphviz_test.dot and output graphviz_test_new.dot. | a1 --> a2 b3 | a2 --> a3 | a3 --> end | a0 --> a1 a2 a3 | b0 --> b1 a1 a2 a3 a0 | b1 --> b2 a1 a2 a3 a0 | b2 --> b3 a1 a2 a3 a0 a3 | b3 --> a1 a2 a3 a0 end | start --> a1 a2 a3 a0 b0 | end --> |
I've rebuilt libbgl-viz.lib with YYDEBUG=1, YYERROR_VERBOSE=1 and int yydebug=1 to get more output. However, I don't know enough of the graphviz parser internals to continue debugging this. Hopefully, this output will be useful to someone more knowledgeable. Again note that the same code compiled with VC7.1 works, ie, does not have this syntax error. | ...\gcc\debug\runtime-link-static>graphviz.exe graphviz_test.dot | ... | graphviz.exe | Starting parse | Entering state 0 | Reading a token: Next token is token DIGRAPH_T () | Shifting token DIGRAPH_T, Entering state 2 | Reducing stack by rule 5 (line 274), DIGRAPH_T -> graph_type | Stack now 0 | Entering state 5 | Reading a token: Next token is token ID_T () | Shifting token ID_T, Entering state 9 | Reducing stack by rule 6 (line 277), ID_T -> graph_name | Stack now 0 5 | Entering state 10 | Reducing stack by rule 3 (line 260), graph_type graph_name -> graph_header | Stack now 0 | Entering state 4 | Reading a token: Next token is token '{' () | Shifting token '{', Entering state 7 | Reading a token: Next token is token $undefined () | Reducing stack by rule 42 (line 460), -> @1 | Stack now 0 4 7 | Entering state 29 | Next token is token $undefined () | syntax error, unexpected $undefined, expecting '{' | Error: popping nterm @1 () | Stack now 0 4 7 | Error: popping token '{' () | Stack now 0 4 | Error: popping nterm graph_header () | Stack now 0 |
participants (1)
-
Tan Kwee Heong