Boost X3 : what is equivalent to Qi keyword parser directive?

25 Views Asked by At

I am considering rewritting a parser made in spirit::qi into x3. I can not find what is equivalent in X3 to the kwd directive used in conjonction with the / operator.

1

There are 1 best solutions below

4
sehe On

The kwd directive is not a part of Spirit Qi. It's part of the Spirit Repository.

The operator/ support is also also not part of Qi. As such, you have to expect to write these yourself.

Luckily in X3 that is relatively simple. I have many examples on this site showing how to make a kw or ikw parser modifier:

To actually get the full behavior with optional repeats and attribute binding I think the only realistic way is to make a custom parser type.