Skip to content
This repository has been archived by the owner on Feb 21, 2018. It is now read-only.

permutation operator ^ absent #20

Open
alfC opened this issue Sep 22, 2016 · 0 comments
Open

permutation operator ^ absent #20

alfC opened this issue Sep 22, 2016 · 0 comments

Comments

@alfC
Copy link

alfC commented Sep 22, 2016

...in X3.

Is it not fundamental or lightweight? Is there an obvious way that permutation can be implemented by the user? (I don't know enough about grammars to tell)

x3::phrase_parse(
            str.begin(), str.end(),
                (x3::lit("a") >> '=' >> x3::double_)
                ^
                (x3::lit("b") >> '=' >> x3::double_) 
            ,
            x3::space,
            ab
);

Currently I am doing phrase_parse( ..., *( (x3::lit("a") >> "=" >> x3::double_)[action] | (x3::lit("b") >> "=" >> x3::double_)[action] ) ...) but I think it is not the same.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant