ICode9

精准搜索请尝试: 精确搜索
  • c-在运行时合并规则并返回规则2019-10-11 20:08:42

    我正在尝试编写一些在Spirit-X3之上构建的复杂解析器,因此我需要了解一些事情: •如何在运行时合并规则. (用纳比亚力克的把戏) ♦返回这样的规则是否可以: x3::rule<char> SomeFunction(std::string &str) { x3::rule<char> foo; auto bar = baz; BOOST_SPIRIT_DEFINE(

  • c – Boost Spirit X3无法使用变量因子编译repeat指令2019-09-23 04:04:30

    我试图使用Boost Spirit X3指令重复一个可变的重复因子.基本思想是头有效载荷,其中头指定有效载荷的大小.一个简单的例子“3 1 2 3”被解释为header = 3,data = {1,2,3}(3个整数). 我只能从精神qi文档中找到例子.它使用boost phoenix引用来包装变量因子:http://www.boost.org/doc/li

  • c – Spirit X3没有用于调用’move_to’的匹配函数2019-08-29 09:17:29

    为什么这不编译? (评论r3将编译,但我想在规则中使用分号) #include <boost/spirit/home/x3.hpp> #include <boost/fusion/include/adapt_struct.hpp> #include <string> #include <vector> struct v { std::string value; }; BOOST_FUSION_ADAPT_STRUCT ( v,

  • c – 将已解析序列的每个元素传递给返回规则属性类型的函数2019-08-27 23:06:09

    我想解析CSS颜色函数(为简单起见,所有参数都是0到255之间的数字) rgb(r,g,b) rgba(r,g,b,a) hsl(h,s,l) hsla(h,s,l,a) 成 struct color { color(std::uint8_t r, std::uint8_t g, std::uint8_t b, std::uint8_t a) : red{r}, green{g}, blue{b}, alpha{a} {} static co

  • c – 用容器解析结构2019-07-24 19:06:54

    如何使用boost.spirit x3解析为如下结构: struct person{ std::string name; std::vector<std::string> friends; } 来自boost.spirit v2我会使用语法,但由于X3不支持语法,我不知道如何干净. 编辑:如果有人可以帮我编写一个解析字符串列表的解析器并返回第一个字符串的人是

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有