boost-spirit Questions

2

Solved

The code below is from the Boost.Spirit x3 documentation. It uses an interesting C++ syntax that I've never seen before, which is nearly impossible to describe in a search query without knowing the...
Scamper asked 31/8, 2016 at 0:12

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

I want to write a parser (as a qi extension) which can be used via my_parser(p1, p2, ...) where p1, p2, ... are qi parser expressions. Actually, I want to implement a best_matchparser which works ...
Unconformable asked 7/6, 2016 at 3:18

2

Solved

In Boost::Spirit, how can I trigger an expectation_failure from a function bound with Boost::Bind? Background: I parse a large file that contains complex entries. When an entry is inconsistent wit...
Lori asked 22/5, 2012 at 17:2

5

Solved

I've been looking recently at Boost.Spirit (the version included in Boost 1.39), however I'm quite confused from the docs alone. What I'm looking for is for an example of a toy language imple...
Battleplane asked 14/7, 2009 at 8:52

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

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

3

I need to parse a rather simple stack based language, e.g. 1 2 add 3 1 sub and I'm facing two choices here: Write my own lexer for the tokens and then proceed parsing it Use boost spirit I h...
Pharynx asked 21/11, 2015 at 17:14

2

Solved

Can you help me understand the difference between the a % b parser and its expanded a >> *(b >> a) form in Boost.Spirit? Even though the reference manual states that they are equivalent...
Slice asked 20/11, 2015 at 0:1

1

Solved

I am trying to use the Boost Spirit X3 directive repeat with a repetition factor that is variable. The basic idea is that of a header + payload, where the header specifies the size of the payload. ...
Aho asked 10/11, 2015 at 6:29

1

Solved

I've the following class: #ifndef WFRACTAL_FRACTAL_METADATA_H_ #define WFRACTAL_FRACTAL_METADATA_H_ #include <string> namespace WFractal { namespace Fractal { class Metadata { public: ...
Landy asked 1/11, 2015 at 17:10

1

Solved

I'm trying to parse a list of numbers into a fixed sized std::array container using boost::spirit's newest release x3 (as included in boost 1.54). Since std::array has the necessary functions, it i...
Chondro asked 12/10, 2015 at 13:29

2

Solved

I need to format double values into coordinate strings that have a very specific format, "DDMMSS.SSX" where: "DD" is the full degrees "MM" is the full minutes "SS.SS" is the seconds with fractio...
Kutuzov asked 15/9, 2015 at 6:45

1

In its answer to this question, hkaiser said he would write an example of a token type which carries code position information. I really cannot find anything about this. Can anyone point me to suc...
Gasaway asked 18/8, 2015 at 13:11

1

Solved

Consider: struct s { AttrType f(const std::string &); }; ...and a rule r with an attribute AttrType: template <typename Signature> using rule_t = boost::spirit::qi::rule<Iterator...
Bluebell asked 11/6, 2015 at 15:6

1

Solved

My intent is to parse a comma separated list of values into a nested vector. This list is two-dimensional. The basic question is: is it possible to parse into a vector of vector with boost::spirit...
Alarm asked 24/4, 2015 at 13:6

1

Solved

I'm trying to use the on_error mechanism of Boost::Spirit::qi to find out why the parsing failed. I've set a breakpoint at the on_error function and the function is being called, but no output (n...
Preempt asked 25/3, 2015 at 23:34

3

Solved

I have large Boost/Spirit metaprogram that is blowing gcc's stack when I try to compile it. How can I increase gcc's stack size, so I can compile this program? Note: There's no infinite recursion...
Cryptocrystalline asked 21/7, 2009 at 0:56

2

Solved

I am attempting to use boost::spirit::qi to do some parsing. It's actually going quite well, and I successfully have managed to parse numbers in various bases based on a suffix. Examples: 123, c12h...
Petersham asked 18/3, 2015 at 21:14

1

Solved

I'm currently trying to write a parser for an ASCII text file that is surrounded by a small envelope with checksum. The basic structure of the file is: <0x02><"File payload"><0x03><16b...
Dogfight asked 19/3, 2015 at 12:39

© 2022 - 2024 — McMap. All rights reserved.