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


Hi,

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_ >>
*x3::char_).
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?

Cheers,

Matthieu

-- 
Quantitative analyst, Ph.D.
Blog: http://blog.audio-tk.com/
LinkedIn: http://www.linkedin.com/in/matthieubrucher


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net