]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/spirit/example/x3/calc/calc4b.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / spirit / example / x3 / calc / calc4b.cpp
index c104e6a813f5923cae6e48ba77af0beaf6453f5f..176359ab8b9f55c18a75453632bce7bbfece1b2b 100644 (file)
@@ -188,27 +188,28 @@ namespace client
         x3::rule<class term, ast::program> const term("term");
         x3::rule<class factor, ast::operand> const factor("factor");
 
-        BOOST_SPIRIT_DEFINE(
-            expression =
+        auto const expression_def =
                 term
                 >> *(   (char_('+') >> term)
                     |   (char_('-') >> term)
                     )
-                ,
+                ;
 
-            term =
+        auto const term_def =
                 factor
                 >> *(   (char_('*') >> factor)
                     |   (char_('/') >> factor)
                     )
-                ,
+                ;
 
-            factor =
+        auto const factor_def =
                     uint_
                 |   '(' >> expression >> ')'
                 |   (char_('-') >> factor)
                 |   (char_('+') >> factor)
-        );
+                ;
+
+        BOOST_SPIRIT_DEFINE(expression, term, factor);
         
         auto calculator = expression;
     }