我基于我的应用程序关闭这个例子,并得到完全相同的结果。出于某种原因,输入字符串的内容全部被解析为融合结构'comments',并且没有任何东西被解析为融合结构'numbers'。所以不知道我在哪里错了。 namespace client {
namespace ast {
struct number {
int num1;
int num2;
我想用Boost.Spirit来解析嵌套列表的数字。这是我到目前为止有: //define a test string
std::string string = "[[\t1 , 2 ], [3, 4, 65.4]]";
auto it = string.begin();
//parse the string
std::vector<std::vector<double>> vector
我正在考虑自永远以来(自从Uni上的编译器类以来,我主要已经忘记了)编写基本上我的第一个解析器。 由于我使用C++,我正在考虑使用Boost Spirit。然后我注意到有“常规”2.5.2,并且有一些名为Spirit X3的代码有一些神奇的子集。 我也注意到Boost Spirit X3在两年前已经发布/讨论/预发布,但Boost Spirit的正式版本是2.5.2。最后,我读: Where is