boost-spirit 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

2

As like the description on Boost.Spirit, the only difference between lexeme and no_skip is the pre_skip. But after some test, I'm still confusing about the exactly meaning for pre_skip. So what kin...
Liddell asked 3/8, 2020 at 17:44

1

Solved

I am trying to write some parsers with boost.spirit.qi but when i am compiling i am getting the following deprecated warnings: In file included from /usr/include/boost/iostreams/detail/is_derefere...
Salutatory asked 22/5, 2016 at 9:59

1

So I am playing with lpeg to replace a boost spirit grammar, I must say boost::spirit is far more elegant and natural than lpeg. However it is a bitch to work with due to the constraints of current...
Sodality asked 1/11, 2011 at 15:20

8

Solved

I have a file with millions of lines, each line has 3 floats separated by spaces. It takes a lot of time to read the file, so I tried to read them using memory mapped files only to find out that th...
Squilgee asked 4/7, 2013 at 8:10

6

Solved

I want to parse a boolean expression (in C++). Input form: a and b xor (c and d or a and b); I just want to parse this expression into a tree, knowing the precedence rule (not,and,xor,or). So th...
Hypozeugma asked 2/1, 2012 at 23:23

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

I was toying with Boost.Spirit X3 calculator example when I encountered an error I couldn't get my head around. I minimized the program to reduce complexity still throwing the same error. Say I w...
Lovemaking asked 9/5, 2018 at 11:51

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

I wanted to raise a subject that just sent me down a rabbit hole and brought up a question about qi::symbols. It all started while I was looking into the new beast library and read a tutorial exa...
Repulsion asked 12/1, 2018 at 22:54

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've the following class diagram: There's some unused class like BinaryOperator, but my real code needs them so I want to keep them also in the example. I want to use boost::karma in order to o...
Trilemma asked 19/10, 2017 at 21:10

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

I am trying to compile a parser with the following rules: else_statement = lit("else") > statement; if_statement = lit("if") >> '(' >> expression >> ')' >> statement ...
Favus asked 23/6, 2017 at 22:55

1

Solved

Below is the employee.cpp source file from the boost spirit documentation. It's 'struct employee' followed by a macro that tells fusion about 'struct employee', followed by the employee parser. I ...
Yolanda asked 16/6, 2017 at 4:59

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

Solved

I am writing a karma generator to generate a HTML page and I am experiencing inconsistent behavior while using column directive. It could very well be my understanding of how it works. Basically I...
Decern asked 1/5, 2017 at 13:40

4

Solved

I'm in the progress of writing a compiler for a subset of Java, using boost::spirit, for lexing and parsing. During compilation of the lexer/parser phase, the compiler consumes 1.6GB of RAM (g++ (G...
Unwept asked 9/9, 2013 at 8:46

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

3

Solved

I'm trying to learn boost::spirit. As an example, I'm trying to parse a sequence of words into a vector<string>. I tried this: #include <boost/spirit/include/qi.hpp> #include <boos...
Ultrared asked 2/5, 2012 at 21: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

3

Solved

How can I match utf8 unicode characters using boost::spirit? For example, I want to recognize all characters in this string: $ echo "На берегу пустынных волн" | ./a.out Н а б е р е гу п у с т ы н...
Doxology asked 6/5, 2012 at 21:45

© 2022 - 2024 — McMap. All rights reserved.