Boost logo

Boost-Commit :

From: jurko.gospodnetic_at_[hidden]
Date: 2008-08-23 07:51:45


Author: jurko
Date: 2008-08-23 07:51:45 EDT (Sat, 23 Aug 2008)
New Revision: 48313
URL: http://svn.boost.org/trac/boost/changeset/48313

Log:
Updated the comment parsing logic in Boost Build's util/doc.jam module. Now correctly recognizes comment blocks starting with an empty line and correctly parses comment lines where the initial # character is followed by a non-whitespace characters.

This for example allows it to correctly process comments written like this:

######################################
#
# And example comment.
#
######################################

Which would previously not get interpreted as valid module description comment blocks.
Text files modified:
   trunk/tools/build/v2/util/doc.jam | 8 ++++----
   1 files changed, 4 insertions(+), 4 deletions(-)

Modified: trunk/tools/build/v2/util/doc.jam
==============================================================================
--- trunk/tools/build/v2/util/doc.jam (original)
+++ trunk/tools/build/v2/util/doc.jam 2008-08-23 07:51:45 EDT (Sat, 23 Aug 2008)
@@ -606,7 +606,7 @@
     : jamfile * # The project Jamfile.
 )
 {
- if $(jamfile<$(jamfile)>.docs[1])
+ if $(jamfile<$(jamfile)>.docs)
     {
         # Print the docs.
         print.section "Project-specific help"
@@ -625,7 +625,7 @@
     config-file # The configuration Jamfile.
 )
 {
- if $(jamfile<$(config-file)>.docs[1])
+ if $(jamfile<$(config-file)>.docs)
     {
         # Print the docs.
         print.section "Configuration help"
@@ -649,7 +649,7 @@
     local l = [ MATCH "^[$(ws)]*(#)(.*)$" : $(line) ] ;
     while $(l[1]) && $($(var))
     {
- if $(l[2]) { comment += [ MATCH "^[$(ws)](.*)$" : $(l[2]) ] ; }
+ if $(l[2]) { comment += [ MATCH "^[$(ws)]?(.*)$" : $(l[2]) ] ; }
         else { comment += "" ; }
         $(var) = $($(var)[2-]) ;
         line = $($(var)[1]) ;
@@ -908,7 +908,7 @@
             set-module-copyright $(module-name) : $(comment-block) ;
         }
         else if $(action[1]) in "print-help-project" "print-help-config"
- && ! $(jamfile<$(target)>.docs[1])
+ && ! $(jamfile<$(target)>.docs)
         {
             # special module docs for the project jamfile.
             jamfile<$(target)>.docs = $(comment-block) ;


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