Update of /cvsroot/boost/boost/tools/quickbook
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10876

Modified Files:
        code_snippet.hpp 
Log Message:
callouts refinement

Index: code_snippet.hpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/quickbook/code_snippet.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- code_snippet.hpp    21 Feb 2007 00:48:28 -0000      1.3
+++ code_snippet.hpp    28 Feb 2007 10:20:36 -0000      1.4
@@ -49,16 +49,24 @@
 
                 code_elements =
                         escaped_comment
-                    |   callout
+                    |   line_callout
+                    |   inline_callout
                     |   (anychar_p - "//]")         
[boost::bind(&self_type::pass_thru, &self, _1, _2)]
                     ;
 
-                callout =
+                inline_callout =
                     "/*<"
-                    >> (*(anychar_p - ">*/"))       
[boost::bind(&self_type::callout, &self, _1, _2)]
+                    >> (*(anychar_p - ">*/"))       
[boost::bind(&self_type::inline_callout, &self, _1, _2)]
                     >> ">*/"
                     ;
 
+                line_callout =
+                    "/*<<"
+                    >> (*(anychar_p - ">>*/"))      
[boost::bind(&self_type::line_callout, &self, _1, _2)]
+                    >> ">>*/"
+                    >> *space_p
+                    ;
+
                 escaped_comment =
                         *space_p >> "//`" >> *space_p
                         >> ((*(anychar_p - eol_p))
@@ -69,7 +77,9 @@
                     ;
             }
 
-            rule<Scanner> start_, snippet, identifier, code_elements, 
escaped_comment, callout;
+            rule<Scanner>
+                start_, snippet, identifier, code_elements, escaped_comment,
+                inline_callout, line_callout;
 
             rule<Scanner> const&
             start() const { return start_; }
@@ -78,7 +88,9 @@
         void pass_thru(iterator first, iterator last) const;
         void escaped_comment(iterator first, iterator last) const;
         void compile(iterator first, iterator last) const;
-        void callout(iterator first, iterator last) const;
+        void callout(iterator first, iterator last, char const* role) const;
+        void inline_callout(iterator first, iterator last) const;
+        void line_callout(iterator first, iterator last) const;
 
         mutable std::string code;
         mutable std::string snippet;


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to