Boost logo

Boost Users :

Subject: [Boost-users] Boost Spirit X3 and spaces
From: Matthieu Brucher (matthieu.brucher_at_[hidden])
Date: 2018-07-29 17:24:11


What is the best strategy to handle spaces with X3?
The files I want to parse have sometimes spaces or tabs for separators, but
I also need to scan number that have an attached suffix (so x3::double_ >>
If now I want to parse groups of strings, starting with a rule like
const auto pin = x3::rule<class pin, std::string>()

  = x3::alpha >> *x3::char_;
what is the best to create a vector of these? *pin or pin % ' ' and will
the latter also handle tabs by default?



Quantitative analyst, Ph.D.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at