Spirit 3.0.0

classic Classic list List threaded Threaded
33 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Spirit 3.0.0

Joel de Guzman
Hello!

C++ Now 2015. Today is the official release of Spirit X3, aka
Spirit 3.0.0. X3 will be in beta, coexisting side by side with
Qi, Karma, Lex and Classic.

If you are a Qi user. The best place to start are the examples,
especially rexpr and x3 fun.

Remember to use a compiler with c++14 capabilities:

clang 3.4 or greater
gcc 4.9 or greater

Follow this link for more:
http://boost-spirit.com/home/2015/05/16/spirit-3-0-0/

Cheers!
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Aaron Graham-2

On Sat, May 16, 2015 at 5:26 PM, Joel de Guzman <[hidden email]> wrote:
Hello!

C++ Now 2015. Today is the official release of Spirit X3, aka
Spirit 3.0.0. X3 will be in beta, coexisting side by side with
Qi, Karma, Lex and Classic.

If you are a Qi user. The best place to start are the examples,
especially rexpr and x3 fun.

Remember to use a compiler with c++14 capabilities:

clang 3.4 or greater
gcc 4.9 or greater

Really? Did you add in a workaround this?


Follow this link for more:
http://boost-spirit.com/home/2015/05/16/spirit-3-0-0/

Cheers!
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Richard-45
In reply to this post by Joel de Guzman

In article <mj8n8d$4o9$[hidden email]>,
    Joel de Guzman <[hidden email]> writes:

> Remember to use a compiler with c++14 capabilities:
>
> clang 3.4 or greater
> gcc 4.9 or greater

Have you tried VS 2015 CTP?
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Joel de Guzman
On 5/17/15 11:00 AM, Richard wrote:

>
> In article <mj8n8d$4o9$[hidden email]>,
>      Joel de Guzman <[hidden email]> writes:
>
>> Remember to use a compiler with c++14 capabilities:
>>
>> clang 3.4 or greater
>> gcc 4.9 or greater
>
> Have you tried VS 2015 CTP?

No, I haven't.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Joel de Guzman
In reply to this post by Aaron Graham-2
On 5/17/15 8:59 AM, Aaron Graham wrote:

>
> On Sat, May 16, 2015 at 5:26 PM, Joel de Guzman <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hello!
>
>     C++ Now 2015. Today is the official release of Spirit X3, aka
>     Spirit 3.0.0. X3 will be in beta, coexisting side by side with
>     Qi, Karma, Lex and Classic.
>
>     If you are a Qi user. The best place to start are the examples,
>     especially rexpr and x3 fun.
>
>     Remember to use a compiler with c++14 capabilities:
>
>     clang 3.4 or greater
>     gcc 4.9 or greater
>
>
> Really? Did you add in a workaround this?
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63198

Yep. I had a workaround or it.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Michael Powell-2
In reply to this post by Joel de Guzman
On Sat, May 16, 2015 at 8:26 PM, Joel de Guzman <[hidden email]> wrote:
> Hello!
>
> C++ Now 2015. Today is the official release of Spirit X3, aka
> Spirit 3.0.0. X3 will be in beta, coexisting side by side with
> Qi, Karma, Lex and Classic.

It's great news! WTG!

> If you are a Qi user. The best place to start are the examples,
> especially rexpr and x3 fun.
>
> Remember to use a compiler with c++14 capabilities:
>
> clang 3.4 or greater
> gcc 4.9 or greater

It is good to know re: gcc (and clang).

Ditto VS support, for those of us who haven't made the "leap" to VS
2015 CTP; still in VS 2013 Update 4. The standards vs compiler saga
continues...

> Follow this link for more:
> http://boost-spirit.com/home/2015/05/16/spirit-3-0-0/
>
> Cheers!
> --
> Joel de Guzman
> http://www.ciere.com
> http://boost-spirit.com
> http://www.cycfi.com/
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Spirit-general mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/spirit-general

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Aaron Graham-2
In reply to this post by Joel de Guzman


On Sat, May 16, 2015 at 9:34 PM, Joel de Guzman <[hidden email]> wrote:
On 5/17/15 8:59 AM, Aaron Graham wrote:
>
> On Sat, May 16, 2015 at 5:26 PM, Joel de Guzman <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hello!
>
>     C++ Now 2015. Today is the official release of Spirit X3, aka
>     Spirit 3.0.0. X3 will be in beta, coexisting side by side with
>     Qi, Karma, Lex and Classic.
>
>     If you are a Qi user. The best place to start are the examples,
>     especially rexpr and x3 fun.
>
>     Remember to use a compiler with c++14 capabilities:
>
>     clang 3.4 or greater
>     gcc 4.9 or greater
>
>
> Really? Did you add in a workaround this?
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63198

Yep. I had a workaround or it.

FANTASTIC

Thanks, Joel. I will give it a thorough going-over at my first opportunity.
 

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Richard-45
Just out of curiosity, what are the C++14 features that are required
for Spirit 3?

I'm guessing something to do with variadic template arguments/parameter
packs?
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Baptiste Wicht
In reply to this post by Joel de Guzman
Hi,

On Sun, May 17, 2015 at 08:26:53AM +0800, Joel de Guzman wrote:
> C++ Now 2015. Today is the official release of Spirit X3, aka
> Spirit 3.0.0. X3 will be in beta, coexisting side by side with
> Qi, Karma, Lex and Classic.

Great news :)

I'll try the last version on my compiler again when I have some time.

Baptiste

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general

attachment0 (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Joel de Guzman
In reply to this post by Richard-45
On 5/18/15 10:11 AM, Richard wrote:
> Just out of curiosity, what are the C++14 features that are required
> for Spirit 3?
>
> I'm guessing something to do with variadic template arguments/parameter
> packs?

That is c++11. Actually, at the very least, we use generic lambdas and
function return type deduction.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Richard-45

In article <[hidden email]>,
    Joel de Guzman <[hidden email]> writes:

> On 5/18/15 10:11 AM, Richard wrote:
> > Just out of curiosity, what are the C++14 features that are required
> > for Spirit 3?
> >
> > I'm guessing something to do with variadic template arguments/parameter
> > packs?
>
> That is c++11. Actually, at the very least, we use generic lambdas and
> function return type deduction.

Ah... Thanks for clarifying that!
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Orient
In reply to this post by Joel de Guzman
Is it safe to pass visitors (not only lambda-functions) in lambda_visitor by value?
I reinvent your class for composing lambdas (btw it have support for lvalue(const) referenced visitors):

#include <iostream>
#include <utility>
#include <type_traits> 

#include <cstdlib>
#include <cassert>

namespace details
{

template< typename ...visitors >
struct composite_visitor;
 
template< typename visitor, typename ...visitors >
struct composite_visitor< visitor, visitors... >
    : std::remove_reference_t< visitor >
    , composite_visitor< visitors... >
{
   
    using this_type = std::remove_reference_t< visitor >;
    using base_type = composite_visitor< visitors... >;
   
    composite_visitor(visitor && _visitor, visitors &&... _visitors)
        : this_type(std::forward< visitor >(_visitor))
        , base_type(std::forward< visitors >(_visitors)...)
    { ; }
   
};
 
template<  typename visitor >
struct composite_visitor< visitor >
    : std::remove_reference_t< visitor >
{
   
    using this_type = std::remove_reference_t< visitor >;
   
    composite_visitor(visitor && _visitor)
        : this_type(std::forward< visitor >(_visitor))
    { ; }
   
};

}
 
template< typename visitor, typename ...visitors >
details::composite_visitor< visitor, visitors... >
compose_visitors(visitor && _visitor, visitors &&... _visitors)
{
    return {std::forward< visitor >(_visitor), std::forward< visitors >(_visitors)...};
}

namespace details
{

template< typename R, typename visitor >
struct add_result_type
    : std::remove_reference_t< visitor >
{

    using result_type = R;
    using visitor_type = std::remove_reference_t< visitor >;

    add_result_type(visitor && _visitor)
        : visitor_type{std::forward< visitor >(_visitor)}
    { ; }

};

}

template< typename result_type = void, typename visitor = void >
details::add_result_type< result_type, visitor >
add_result_type(visitor && _visitor) // for boost::apply_visitor support
{
    return {std::forward< visitor >(_visitor)};
}

int
main()
{
    auto const l0 = [] (auto &&) { return 0; };
    auto const l1 = [] (auto const &) { return 1; };
    auto const l2 = [] (auto &) { return 2; };
    auto const l3 = [] (auto const &&) { return 3; };
    auto const l = compose_visitors(l0, l1, l2, l3);
   
    struct A {};
    A const c{};
    A a{};
    assert(0 == l(A{}));
    assert(1 == l(c));
    assert(2 == l(a));
    assert(3 == l(std::move(c)));
   
    struct R {};
    auto const rvl = add_result_type< R >(l);
    static_assert(std::is_same< decltype(rvl)::result_type, R >{});
    assert(0 == rvl(A{}));
    assert(1 == rvl(c));
    assert(2 == rvl(a));
    assert(3 == rvl(std::move(c)));
   
    auto const la = compose_visitors(l, [] (A const &) { return -1; });
    assert(0 == la(A{}));
    assert(-1 == la(c));
    assert(2 == la(a));
    assert(3 == la(std::move(c)));
   
    struct V { auto operator () (A const &) && { return -1; } };
    auto lam = compose_visitors(l, V{});
    assert(1 == lam(c));
    assert(-1 == std::move(lam)(c));
    return EXIT_SUCCESS;
}
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Aaron Graham-2
In reply to this post by Aaron Graham-2
I'm trying to modify some of our simplest production parsers to use X3. I have one that parses a sequence into multiple attributes. It won't work, so I worked all the way back to the following example in the documentation:

namespace x3 = boost::spirit::x3;
// the following parses "1.0 2.0" into a pair of double
std::string input("1.0 2.0");
std::string::iterator strbegin = input.begin();
std::pair<double, double> p;
x3::phrase_parse(strbegin, input.end(),
    x3::double_ >> x3::double_,       // parser grammar
    x3::space,                        // delimiter grammar
    p);                               // attribute to fill while parsing
}

Unfortunately, I get the same sort of error when I work back to this trivial example:

./boost/spirit/home/x3/support/traits/move_to.hpp:58:18: error: no match for ‘operator=’ (operand types are ‘std::pair<double, double>’ and ‘std::remove_reference<double&>::type {aka double}’)
             dest = std::move(src);

This page of documentation also has this tip section, but I don't see the corresponding varargs versions of phrase_parse anywhere in the x3 code.

[Tip]
Tip

For sequences only: Spirit.X3 exposes a set of API functions usable mainly with sequences. Very much like the functions of the scanf and printf families these functions allow to pass the attributes for each of the elements of the sequence separately. Using the corresponding overload of X3's parse function, the expression above could be rewritten as:

double d1 = 0.0, d2 = 0.0;
x3::phrase_parse(begin, end, x3::double_ >> x3::double_, x3::space, d1, d2);

where the first attribute is used for the first double_, and the second attribute is used for the second double_.



On Sun, May 17, 2015 at 6:27 PM, Aaron Graham <[hidden email]> wrote:


On Sat, May 16, 2015 at 9:34 PM, Joel de Guzman <[hidden email]> wrote:
On 5/17/15 8:59 AM, Aaron Graham wrote:
>
> On Sat, May 16, 2015 at 5:26 PM, Joel de Guzman <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hello!
>
>     C++ Now 2015. Today is the official release of Spirit X3, aka
>     Spirit 3.0.0. X3 will be in beta, coexisting side by side with
>     Qi, Karma, Lex and Classic.
>
>     If you are a Qi user. The best place to start are the examples,
>     especially rexpr and x3 fun.
>
>     Remember to use a compiler with c++14 capabilities:
>
>     clang 3.4 or greater
>     gcc 4.9 or greater
>
>
> Really? Did you add in a workaround this?
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63198

Yep. I had a workaround or it.

FANTASTIC

Thanks, Joel. I will give it a thorough going-over at my first opportunity.
 

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Aaron Graham-2
One other question--qi had this:

qi::parse(begin, end, attribute);

i.e., the "auto" parser, deduced from the type of 'attribute'. I don't see an analogue in x3. What do I use instead?


On Tue, May 19, 2015 at 4:20 PM, Aaron Graham <[hidden email]> wrote:
I'm trying to modify some of our simplest production parsers to use X3. I have one that parses a sequence into multiple attributes. It won't work, so I worked all the way back to the following example in the documentation:

namespace x3 = boost::spirit::x3;
// the following parses "1.0 2.0" into a pair of double
std::string input("1.0 2.0");
std::string::iterator strbegin = input.begin();
std::pair<double, double> p;
x3::phrase_parse(strbegin, input.end(),
    x3::double_ >> x3::double_,       // parser grammar
    x3::space,                        // delimiter grammar
    p);                               // attribute to fill while parsing
}

Unfortunately, I get the same sort of error when I work back to this trivial example:

./boost/spirit/home/x3/support/traits/move_to.hpp:58:18: error: no match for ‘operator=’ (operand types are ‘std::pair<double, double>’ and ‘std::remove_reference<double&>::type {aka double}’)
             dest = std::move(src);

This page of documentation also has this tip section, but I don't see the corresponding varargs versions of phrase_parse anywhere in the x3 code.

[Tip]
Tip

For sequences only: Spirit.X3 exposes a set of API functions usable mainly with sequences. Very much like the functions of the scanf and printf families these functions allow to pass the attributes for each of the elements of the sequence separately. Using the corresponding overload of X3's parse function, the expression above could be rewritten as:

double d1 = 0.0, d2 = 0.0;
x3::phrase_parse(begin, end, x3::double_ >> x3::double_, x3::space, d1, d2);

where the first attribute is used for the first double_, and the second attribute is used for the second double_.



On Sun, May 17, 2015 at 6:27 PM, Aaron Graham <[hidden email]> wrote:


On Sat, May 16, 2015 at 9:34 PM, Joel de Guzman <[hidden email]> wrote:
On 5/17/15 8:59 AM, Aaron Graham wrote:
>
> On Sat, May 16, 2015 at 5:26 PM, Joel de Guzman <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hello!
>
>     C++ Now 2015. Today is the official release of Spirit X3, aka
>     Spirit 3.0.0. X3 will be in beta, coexisting side by side with
>     Qi, Karma, Lex and Classic.
>
>     If you are a Qi user. The best place to start are the examples,
>     especially rexpr and x3 fun.
>
>     Remember to use a compiler with c++14 capabilities:
>
>     clang 3.4 or greater
>     gcc 4.9 or greater
>
>
> Really? Did you add in a workaround this?
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63198

Yep. I had a workaround or it.

FANTASTIC

Thanks, Joel. I will give it a thorough going-over at my first opportunity.
 

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general




------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Joel de Guzman
In reply to this post by Aaron Graham-2
Regards,
On 5/20/15 7:20 AM, Aaron Graham wrote:

> I'm trying to modify some of our simplest production parsers to use X3. I have one that
> parses a sequence into multiple attributes. It won't work, so I worked all the way back to
> the following example in the documentation
> <http://ciere.com/cppnow15/x3_docs/spirit/abstracts/compound_attributes.html>:
>
>     namespace x3 = boost::spirit::x3;
>     // the following parses "1.0 2.0" into a pair of double
>     std::string input("1.0 2.0");
>     std::string::iterator strbegin = input.begin();
>     std::pair<double, double> p;
>     x3::phrase_parse(strbegin, input.end(),
>          x3::double_ >> x3::double_,       // parser grammar
>          x3::space,                        // delimiter grammar
>          p);                               // attribute to fill while parsing
>     }
>
>
> Unfortunately, I get the same sort of error when I work back to this trivial example:
>
>     ./boost/spirit/home/x3/support/traits/move_to.hpp:58:18: error: no match for
>     ‘operator=’ (operand types are ‘std::pair<double, double>’ and
>     ‘std::remove_reference<double&>::type {aka double}’)
>                   dest = std::move(src);

Make sure you include boost/fusion/adapted/std_pair.hpp

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Joel de Guzman
In reply to this post by Aaron Graham-2
On 5/20/15 11:29 AM, Aaron Graham wrote:
> One other question--qi had this:
>
>     qi::parse(begin, end, attribute);
>
>
> i.e., the "auto" parser, deduced from the type of 'attribute'. I don't see an analogue in
> x3. What do I use instead?

I am not sure X3 will have the "auto" parser. One design goal for X3
is to simplify the API and remove some of the less used features.
Holler and lobby if any of you want a feature F in X3.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Joel de Guzman
In reply to this post by Aaron Graham-2
On 5/20/15 7:20 AM, Aaron Graham wrote:
> I'm trying to modify some of our simplest production parsers to use X3. I have one that
> parses a sequence into multiple attributes. It won't work, so I worked all the way back to
> the following example in the documentation

[...]

>
> This page of documentation also has this tip section, but I don't see the corresponding
> varargs versions of phrase_parse anywhere in the x3 code.

Yes, it's not implemented yet I think. I'll try to add it as soon as I can.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Aaron Graham-2
In reply to this post by Joel de Guzman
Thanks. I can't believe I forgot that again. I ended up using std::tuple for easy porting without having to rely on varargs version of phrase_parse:

qi::phrase_parse(iter, end, rule, skipper, descriptor, args);

to:

auto result = std::tie(descriptor, args);
x3::phrase_parse(iter, end, rule, skipper, result);

and all the other code remains roughly the same.


On Tue, May 19, 2015 at 9:56 PM, Joel de Guzman <[hidden email]> wrote:
Regards,
On 5/20/15 7:20 AM, Aaron Graham wrote:
> I'm trying to modify some of our simplest production parsers to use X3. I have one that
> parses a sequence into multiple attributes. It won't work, so I worked all the way back to
> the following example in the documentation
> <http://ciere.com/cppnow15/x3_docs/spirit/abstracts/compound_attributes.html>:
>
>     namespace x3 = boost::spirit::x3;
>     // the following parses "1.0 2.0" into a pair of double
>     std::string input("1.0 2.0");
>     std::string::iterator strbegin = input.begin();
>     std::pair<double, double> p;
>     x3::phrase_parse(strbegin, input.end(),
>          x3::double_ >> x3::double_,       // parser grammar
>          x3::space,                        // delimiter grammar
>          p);                               // attribute to fill while parsing
>     }
>
>
> Unfortunately, I get the same sort of error when I work back to this trivial example:
>
>     ./boost/spirit/home/x3/support/traits/move_to.hpp:58:18: error: no match for
>     ‘operator=’ (operand types are ‘std::pair<double, double>’ and
>     ‘std::remove_reference<double&>::type {aka double}’)
>                   dest = std::move(src);

Make sure you include boost/fusion/adapted/std_pair.hpp

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Joel de Guzman
In reply to this post by Orient
On 5/19/15 2:59 AM, Orient wrote:
> Is it safe to pass visitors (not only lambda-functions) in lambda_visitor by
> value?
> I reinvent your class for composing lambdas (btw it have support for
> lvalue(const) referenced visitors):
>
[...]

Orient, I just got to study the code now (I was traveling). I got to say,
this is fantastic! Would you like to contribute the code?

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Spirit 3.0.0

Joel de Guzman
In reply to this post by Aaron Graham-2
On 5/20/15 1:30 PM, Aaron Graham wrote:

> Thanks. I can't believe I forgot that again. I ended up using std::tuple for easy porting
> without having to rely on varargs version of phrase_parse:
>
>     qi::phrase_parse(iter, end, rule, skipper, descriptor, args);
>
>
> to:
>
>     auto result = std::tie(descriptor, args);
>     x3::phrase_parse(iter, end, rule, skipper, result);

Which makes me wonder if we really need the variadic interface. One
mission of X3 is to keep it simple and less is more.

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
12