Re: X3 iterators into the input for a matching rule
Seth <[email protected]> Sun, 3 Jun 2018 23:09:25 +0200
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
On 03-06-18 16:23, Maarten Verhage wrote: > Dear people, > > My application goal is as follows: > > 1) parse an ascii file, > 2) modify a few things, > 3) write it back. > > However the file has portions that I just don’t need to modify. For these > portions I just want Spirit to provide me two iterators into the original > input so I can std::copy that portion to a memory area that will become my > new file. Separate idea: https://stackoverflow.com/questions/36994539/boost-spirit-x3-parser-which-produces-offsets-into-the-original-string/37003186#37003186 Keep in mind you can have several semantic actions, so raw [ (int >> ':' >> double) [store_values] ] [store_iterator_range]) is perfectly fine ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot