Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53264 - in trunk/libs/graph: src test
From: jewillco_at_[hidden]
Date: 2009-05-25 19:59:45


Author: jewillco
Date: 2009-05-25 19:59:45 EDT (Mon, 25 May 2009)
New Revision: 53264
URL: http://svn.boost.org/trac/boost/changeset/53264

Log:
Added backslash-newline as a form of whitespace outside strings
Text files modified:
   trunk/libs/graph/src/read_graphviz_new.cpp | 7 ++++++-
   trunk/libs/graph/test/graphviz_test.cpp | 2 +-
   2 files changed, 7 insertions(+), 2 deletions(-)

Modified: trunk/libs/graph/src/read_graphviz_new.cpp
==============================================================================
--- trunk/libs/graph/src/read_graphviz_new.cpp (original)
+++ trunk/libs/graph/src/read_graphviz_new.cpp 2009-05-25 19:59:45 EDT (Mon, 25 May 2009)
@@ -137,7 +137,12 @@
       std::string slash_slash_comment = "(?://.*$)";
       std::string slash_star_comment = "(?:/\\*.*?\\*/)";
       std::string hash_comment = "(?:^#.*?$)";
- stuff_to_skip = "\\A(?:" + whitespace + "|" + slash_slash_comment + "|" + slash_star_comment + "|" + hash_comment + ")*";
+ std::string backslash_newline = "(?:[\\\\][\\n])";
+ stuff_to_skip = "\\A(?:" + whitespace + "|" +
+ slash_slash_comment + "|" +
+ slash_star_comment + "|" +
+ hash_comment + "|" +
+ backslash_newline + ")*";
       basic_id_token = "\\A([[:alpha:]_](?:\\w*))";
       punctuation_token = "\\A([][{};=,:+()@]|[-][>-])";
       number_token = "\\A([-]?(?:(?:\\.\\d+)|(?:\\d+(?:\\.\\d*)?)))";

Modified: trunk/libs/graph/test/graphviz_test.cpp
==============================================================================
--- trunk/libs/graph/test/graphviz_test.cpp (original)
+++ trunk/libs/graph/test/graphviz_test.cpp 2009-05-25 19:59:45 EDT (Mon, 25 May 2009)
@@ -174,7 +174,7 @@
   {
     mass_map_t masses;
     insert ( masses ) ("a",0.0f) ("c",7.7f) ("e", 6.66f);
- gs_t gs("graph { a node [mass = 7.7] c e [mass = 6.66] }");
+ gs_t gs("graph { a node [mass = 7.7] c e [mass =\\\n6.66] }");
     BOOST_CHECK((test_graph<undirectedS,vecS>(gs,3,masses,weight_map_t())));
   }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk