$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r85117 - in trunk/tools/quickbook: doc src test
From: dnljms_at_[hidden]
Date: 2013-07-22 15:34:33
Author: danieljames
Date: 2013-07-22 15:34:32 EDT (Mon, 22 Jul 2013)
New Revision: 85117
URL: http://svn.boost.org/trac/boost/changeset/85117
Log:
Error if phrase element body doesn't parse.
Added:
   trunk/tools/quickbook/test/role-1_7-fail.quickbook   (contents, props changed)
   trunk/tools/quickbook/test/role-1_7.gold   (contents, props changed)
   trunk/tools/quickbook/test/role-1_7.quickbook   (contents, props changed)
Text files modified: 
   trunk/tools/quickbook/doc/1_6.qbk                  |     7 +++++++                                 
   trunk/tools/quickbook/src/main_grammar.cpp         |    10 ++++++++--                              
   trunk/tools/quickbook/test/Jamfile.v2              |     2 ++                                      
   trunk/tools/quickbook/test/role-1_7-fail.quickbook |     5 +++++                                   
   trunk/tools/quickbook/test/role-1_7.gold           |     9 +++++++++                               
   trunk/tools/quickbook/test/role-1_7.quickbook      |     5 +++++                                   
   6 files changed, 36 insertions(+), 2 deletions(-)
Modified: trunk/tools/quickbook/doc/1_6.qbk
==============================================================================
--- trunk/tools/quickbook/doc/1_6.qbk	Mon Jul 22 15:34:03 2013	(r85116)
+++ trunk/tools/quickbook/doc/1_6.qbk	2013-07-22 15:34:32 EDT (Mon, 22 Jul 2013)	(r85117)
@@ -325,6 +325,13 @@
 
 [endsect]
 
+[section:phrase_parse_error Error for invalid phrase elements]
+
+If the body of a phrase element didn't parse, it would be just used
+unprocessed. Now change it to be a hard error.
+
+[endsect]
+
 [section:source_mode Source mode for single entities]
 
 1.7 introduces a new `!` element type for setting the source mode of a single
Modified: trunk/tools/quickbook/src/main_grammar.cpp
==============================================================================
--- trunk/tools/quickbook/src/main_grammar.cpp	Mon Jul 22 15:34:03 2013	(r85116)
+++ trunk/tools/quickbook/src/main_grammar.cpp	2013-07-22 15:34:32 EDT (Mon, 22 Jul 2013)	(r85117)
@@ -207,8 +207,14 @@
                 error(scan.first, scan.first);
                 return true;
             }
-            else if (result || info_.type & element_info::in_phrase) {
-                return result;
+            else if (result) {
+                return true;
+            }
+            else if (qbk_version_n < 107u &&
+                    info_.type & element_info::in_phrase) {
+                // Old versions of quickbook had a soft fail
+                // for unparsed phrase elements.
+                return false;
             }
             else {
                 // Parse error in body.
Modified: trunk/tools/quickbook/test/Jamfile.v2
==============================================================================
--- trunk/tools/quickbook/test/Jamfile.v2	Mon Jul 22 15:34:03 2013	(r85116)
+++ trunk/tools/quickbook/test/Jamfile.v2	2013-07-22 15:34:32 EDT (Mon, 22 Jul 2013)	(r85117)
@@ -85,6 +85,8 @@
     [ quickbook-test preformatted-1_1 ]
     [ quickbook-test preformatted-1_6 ]
     [ quickbook-test role-1_6 ]
+    [ quickbook-test role-1_7 ]
+    [ quickbook-error-test role-1_7-fail ]
     [ quickbook-test section-1_4 ]
     [ quickbook-test section-1_5-unclosed ]
     [ quickbook-test section-1_5 ]
Added: trunk/tools/quickbook/test/role-1_7-fail.quickbook
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/tools/quickbook/test/role-1_7-fail.quickbook	2013-07-22 15:34:32 EDT (Mon, 22 Jul 2013)	(r85117)
@@ -0,0 +1,5 @@
+[article Quickbook Role Fail Test
+[quickbook 1.7]
+]
+
+[role]
Added: trunk/tools/quickbook/test/role-1_7.gold
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/tools/quickbook/test/role-1_7.gold	2013-07-22 15:34:32 EDT (Mon, 22 Jul 2013)	(r85117)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="quickbook_role_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+  <title>Quickbook Role Test</title>
+  <para>
+    <phrase role="keyword">Keyword</phrase> <phrase role="keyword"></phrase>
+  </para>
+</article>
Added: trunk/tools/quickbook/test/role-1_7.quickbook
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/tools/quickbook/test/role-1_7.quickbook	2013-07-22 15:34:32 EDT (Mon, 22 Jul 2013)	(r85117)
@@ -0,0 +1,5 @@
+[article Quickbook Role Test
+[quickbook 1.6]
+]
+
+[role keyword Keyword] [role keyword]