Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
如何使用 `boost::spirit` 将语法解析为 `std::set`?
TL DR 如何解析 a 的结果boost spirit语法转化为std set 完整的问题陈述 作为学习如何使用的练习boost spirit 我正在为 X 500 LDAP 可分辨名称设计一个解析器 语法可以在 BNF 格式中找到RFC
c
boostspirit
boost::spirit 中的运算符优先级?
我使用spirit mini c 样本做了一些测试 不幸的是 它没有按预期保持运算符优先级 int main return 3 gt 10 3 gt 1 评估为 0 return 3 gt 10 3 gt 1 返回 1 我试图移动 的定义和
c
Parsing
boost
boostspirit
Boost.Spirit 将表达式转换为 AST
使用 Boost Spirit 将某些表达式转换为 AST 的正确方法是什么 我尝试构建它 但我认为它很混乱 可以简化很多 https godbolt org z VXHXLY https godbolt org z VXHXLY incl
c
boost
abstractsyntaxtree
boostspirit
为什么 Boost.Spirit 能够正确地将标识符解析为 std::string,而不是解析为仅由 std::string 组成的改编结构?
我为标识符定义了一条规则 以字母字符开头 后跟任意数量的字母数字字符 当我直接解析为时 我得到不同的结果std string与包含单个的改编结构相比std string 如果我的语法的属性是std string Qi 会正确地将字符顺序调整
c
Parsing
boostspirit
boostspiritqi
boostfusion
如何在Boost Spirit中设置最大递归
使用 boost spirit 如果我有递归规则来解析括号 rule
c
recursion
boost
boostspirit
使用 boost Spirit (longest_d) 解析 int 或 double
我正在寻找一种将字符串解析为 int 或 double 的方法 解析器应该尝试两种选择 并选择与输入流的最长部分匹配的一个 有一个已弃用的指令 longest d 正是我正在寻找的 number longest d integer real
c
boost
boostspirit
boostspiritqi
带有调试输出的 X3 解析器段错误 (BOOST_SPIRIT_X3_DEBUG)
Update 这个问题涉及两个问题 如接受的答案 https stackoverflow com a 43688320 2428220 这两个问题都存在于 Boost Spirit X3 随 Boost 1 64 一起提供的版本中 但在撰写
c
boost
segmentationfault
boostspirit
boostspiritx3
boost-spirit 解析器 lex->qi :让“未记录的” on_success 机制发挥作用
edit 我已经删除了词法分析器 因为它没有与 Qi 完全集成 只是混淆了语法 请参阅here https stackoverflow com a 19267593 153865 on success没有很好的记录 我正在尝试将其连接到我的
c
Parsing
boostspirit
lexer
如何使用 boost::spirit::lex 实现包含指令?
我有一个由spirit lex 和spirit qi 构建的简单配置文件解析器 当词法分析器到达模式时include path 我希望包含文件的文本 如您所知 spirit lexer begin 启动扫描过程 Read file cont
c
boost
boostspirit
boostspiritlex
如何使用boost-spirit将结果放入STL图?
include
c
boost
boostspirit
使用 Boost.Spirit.Lex 和流迭代器
我想使用 Boost Spirit Lex 来 lex 二进制文件 为此 我编写了以下程序 这是摘录 include
c
C11
boost
boostspirit
提升精神气整数,文字默认值
我想解析具有特定文字默认值的数字 例如 如果程序接收到 nan 或 n a 则整数默认值为 1 Example program include
c
boost
boostspirit
boost::bool 的可选,在 boost::spirit::qi 语法中
In my boost spirit语法我有以下片段 implicit method declaration qi token ABSTRACT gt gt 的类型 qi token ABSTRACT is boost optional
c
boostspirit
boostspiritqi
Spirit X3,语义操作使编译失败并显示:属性没有预期的大小
此代码无法编译 gcc 5 3 1 boost 1 60 include
c
boostspirit
boostspiritx3
当期望解析器失败时避免抛出期望失败
当期望解析器失败时 如何避免抛出异常 我有一个规则 function gt x3 lexeme keyword gt gt x3 alnum gt gt symbol gt gt lvalue list gt gt statements g
c
boostspirit
boostspiritx3
如何将原始输入捕获到精神语法的合成输出中?
我正在研究 boost spirit qi grammar 并希望将原始文本的一部分复制到语法的合成输出结构中 更具体地说 与规则的组件之一匹配的部分 该语法最终将用作更复杂语法的子语法 因此我实际上无法访问原始输入 我猜测这可以通过语义操
c
boost
boostspirit
Spirit X3,如何让属性类型匹配规则类型?
对于 Spirit X3 解析器的开发 我想使用语义操作 脚注 1 对我来说 控制如何将属性存储到 STL 容器中非常重要 这个问题是关于如何控制解析器属性 attr ctx 与规则类型 val ctx 匹配 以便可以正确分配它 也许这个问
c
boost
boostspirit
boostspiritx3
使用 BOOST_FUSION_ADAPT_ADT 调整类时出错
我有以下课程 ifndef WFRACTAL FRACTAL METADATA H define WFRACTAL FRACTAL METADATA H include
c
boost
grammar
boostspirit
带有 boost 变体递归包装器的字符串解析器
下面的代码 改编自spirit qi mini xml示例 无法编译 存在与规则相关的错误brac具有递归的属性boost variant 然而 所有注释掉的版本brac进行编译 我很好奇是什么让简单的字符串解析器在这种情况下如此特别 in
c
Parsing
boostspirit
boostvariant
如何在Boost Spirit解析器中打印符号表匹配的变量?
我是使用初学者boost spirit 假设我有以下代码来解析带有变量的简单算术表达式 include
c
boost
boostspirit
«
1
2
3
4
5
6
»