boost-spirit-x3 Questions

3

Solved

I'm trying to get a grip with the new Spirit X3 (boost 1.61.0). My machine is a MacBook Pro (i7-4750HQ) running Linux. Having used version 2 of Spirit I was used to large compile times, but this ...
Stainless asked 14/5, 2016 at 18:54

2

Solved

This code does not compiles (gcc 5.3.1 + boost 1.60): #include <boost/spirit/home/x3.hpp> namespace x3 = boost::spirit::x3; template <typename T> void parse(T begin, T end) { auto d...
Accroach asked 5/7, 2016 at 22:16

1

Solved

I'm following the x3 documentation on the boost website, and I've tried to augment the example on how to organize code with the stuff explained in the annotations example that comes after. I'm havi...
Turner asked 30/7, 2019 at 0:33

2

Solved

After reading the the Spirit X3 tutorial on error handling and some experimentation. I was drawn to a conclusion. I believe there is some room for improvement on the topic of error handing in X3. ...
Marelya asked 15/7, 2019 at 22:44

1

I want to efficiently parse large CSV-like files, whose order of columns I get at runtime. With Spirit Qi, I would parse each field with a lazy auxiliary parser that would select at runtime which c...
Brad asked 12/6, 2018 at 16:31

1

Solved

Change my codes from QI to X3, and get some compile error with BOOST_FUSION_ADAPT_ADT. I tried boost 1.64 and 1.67, neither of them work. I modified the spirit X3 example rexpr_min, adding getter a...
Amenity asked 14/5, 2018 at 16:40

1

Solved

I've written the following recursive rule in boost::spirit::x3 but it only seems to compile in g++/clang, not VS2017 (15.5.3): #include <iostream> #include <boost/spirit/home/x3.hpp> ...
Enamour asked 23/1, 2018 at 1:49

1

Solved

I'm migrating a hand-written parser to Boost.Spirit (2.5.4). First impressions are positive, but since I'm using C++17, X3 seems like a very attractive option. Fortunately, there are many resource...
Booty asked 13/1, 2018 at 7:18

1

Solved

I'm learning Boost Spirit by writing a parser that parses two variants of hex number used by NAMS: Hex number with either suffix of 0x/0h or prefix of h/x. Hex number with prefix of $ and must b...
Asquint asked 30/10, 2017 at 4:44

2

Solved

I end up getting these move errors a lot and am not quite sure why other than having something to do with the way I'm parsing strings. Remove everything having to do with 'dummy' and the errors com...
Impressionable asked 18/7, 2017 at 4:12

1

Solved

I'm considering writing what is essentially my first parser since forever (= since the compiler class at Uni which I've forgotten mostly). Since I use C++, I was thinking of using Boost Spirit. Th...
Dedie asked 10/7, 2017 at 14:7

1

Solved

As my parser grows I separated some rules into different translation units (TU) and the linker problem rises. After weeks of several try&errors without success I reduced my ~50 rules to the (ho...
Salford asked 4/5, 2017 at 19:14

1

Solved

(1) Say we want to parse a simple recursive block surrounded by {}. { Some text. { { Some more text. } Some Text again. {} } } This recursive parser is quite simple. x3::rule<struc...
Phonics asked 23/5, 2017 at 9:55

1

I can't find any download for boost spirit 3. Seems like the official website stopped talking about it at the end of December? Where did it go?
Consuetudinary asked 15/3, 2017 at 1:53

1

Solved

I am currently stuck with a rule I am trying to parse using boost spirit x3. Here is the EBNF(using the % operator from spirit for lists) for what I am trying to parse: type ::= class_type | lambda...
Aerogram asked 9/10, 2016 at 23:15

2

Solved

I am currentyl trying to separate my boost spirit x3 parser into different _def and .cpp files using BOOST_SPIRIT_DEFINE/DECLARE/INSTANTIATE, but I keep getting a linking error. HERE is my parser w...
Nates asked 8/11, 2016 at 21:3

2

Solved

I am struggeling writing a identifier parser, which parses a alphanum string which is not a keyword. the keywords are all in a table: struct keywords_t : x3::symbols<x3::unused_type> { keyw...
Etamine asked 26/6, 2016 at 13:59

1

Solved

Is there a document somewhere which describes how various spirit::x3 rule definition operations affect attribute compatibility? I was surprised when: x3::lexeme[ x3::alpha > *(x3::alnum | x3::...
Microsporophyll asked 13/5, 2016 at 4:1

1

Solved

I am trying to learn Boost.Spirit, but I have found a difficulty. I am trying to parse a string into the following structure: struct employee { std::string name; std::string location; }; And it ...
Doublestop asked 10/5, 2016 at 3:15

1

Solved

I am trying to find out the correct way to parse from an istream using x3. Older docs refer to multi_pass stuff, can I still use this? Or is there some other way to buffer streams for X3 so that it...
Commitment asked 6/5, 2016 at 18:52

0

So, I've written my grammar and would like to provide some debug information like line numbers in order to be able to step through the generated executable code with my own debugger. After some go...
Bayless asked 22/3, 2016 at 21:21

1

Solved

Using Boost.Spirit X3, I want to parse a comma-separated list of ranges and individual numbers (e.g. 1-4, 6, 7, 9-12) into a single std::vector<int>. Here's what I've come up with: namespace...
Garner asked 4/1, 2016 at 20:44

1

Trying to tweak the boost spirit x3 calc example to parse functions that can take functions as arguments. However it does not compile. namespace client{ namespace ast{ struct ts; struct fnc; t...
Hest asked 24/6, 2013 at 7:55

1

Solved

I'm trying to parse LaTeX escape codes (e.g. \alpha) to the Unicode (Mathematical) characters (i.e. U+1D6FC). Right now this means I am using this symbols parser (rule): struct greek_lower_case_l...
Illuse asked 18/12, 2015 at 20:50

1

Solved

I am trying to use Boost Spirit X3 with semantic actions while parsing the structure to an AST. If I use a rule without separate definition and instantiation it works just fine, for example: #incl...
Convergent asked 26/11, 2015 at 2:54

© 2022 - 2024 — McMap. All rights reserved.