boost-spirit-qi Questions
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
6
Solved
Recently I was looking for a way to replace tokens in string which is essentially find and replace (but there is at least one additional approach to the problem) and looks like quite banal task. I'...
Parve asked 21/12, 2015 at 18:55
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
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
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
1
Solved
I don't understand the difference between these two operators. Let's take an example parsing inputs like "AA,BB,CC,DD" into vector of strings.
namespace qi = boost::spirit::qi;
class my_grammar : ...
Talipes asked 8/2, 2016 at 21:18
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
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
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
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
1
Solved
I've seen a few posts related to the nuances of keyword/identifier use in qi grammars, but I can't quite make sense of how the approach demonstrated in the boost examples is supposed to work...
Ke...
Homogenesis asked 13/12, 2014 at 20:33
1
Solved
I would like my boost::spirit-based parser to be able to parse a file, convert the parsed rules into different types, and emit a vector containing all of the matches it found. All of the types that...
Dobby asked 25/4, 2014 at 17:46
1
Solved
I already asked question about this issue. But since there were no answers i'm asking again now with full compilable source code snippet.
This code snippet should be compiled with no std=c++11 opt...
Brezhnev asked 23/4, 2014 at 11:6
2
Solved
Are spirit parsers not meant to be used with auto?
A simple parser works fine when passed to qi::parse() inline, but crashes with segfault if passed via an auto variable:
#include <cstdio>
...
Cousin asked 25/2, 2014 at 19:6
1
Solved
#include <iostream>
#include <boost/spirit/include/qi.hpp>
namespace qi = boost::spirit::qi;
int main ()
{
using qi::string;
std::string input("a");
std::string::iterator strbegin ...
Fantasia asked 22/2, 2014 at 19:23
2
Solved
I have the following code:
#include <boost/fusion/include/define_struct.hpp>
#include <boost/spirit/include/qi.hpp>
#include <iostream>
#include <string>
BOOST_FUSION_DEF...
Do asked 10/2, 2014 at 8:37
2
Solved
I would like to convert some old hand-written parsing code to Boost Spirit and learn (more of) spirit in the process. The old code uses streams and templates to parse definitions for some data-type...
Heldentenor asked 20/1, 2014 at 15:53
1
Solved
I develop my code in my spare time. Preferably in debug mode. Recently, when I tried to build release version, then I got the error (runtime, output: 1\n2\n then failure). I located the piece of co...
Lychnis asked 24/12, 2013 at 16:3
1
Solved
I have a working grammar similar to the following:
stock_price = symbol_ >> date_ >> price_;
stock_prices_ = stock_price_ >> stock_prices_ | eps;
grammar_ = lit( "PRICES" ) >&...
Obadias asked 19/12, 2013 at 16:26
2
Solved
I'm trying to parse a sequence of the syntax: < direction > < type > < name >. For example:
in float foo
where the direction can be either in, out, or in_out. I've succeeded in parsing ...
Acatalectic asked 21/11, 2013 at 20:23
1
Solved
I have an compilation issue with Spirit Qi where it complains that value_type is not a member of identifier. For some reason, Qi's attribute system considers identifier to be a container type, and ...
Yellowwood asked 6/11, 2013 at 21:41
1
Solved
Dear Spirit Qi experts.
I have played around with the MiniC example in Spirit Qi, and have noticed an issue with "empty" AST nodes in the expression grammar.
It will generate "expression" nodes th...
Veii asked 31/10, 2013 at 13:2
1 Next >
© 2022 - 2024 — McMap. All rights reserved.