将升压actor_lexer转换为静态:错误,好像"actor_"未使用
Converting a Boost actor_lexer to static: Error as if "actor_" not used
>我正在将Boost Spirit Lex程序转换为静态词法分析器模型。词法分析器具有语义操作,因此动态词法分析器的类型为 actor_lexer
:
#ifndef USE_STATIC_SI_LEXER
typedef lex::lexertl::actor_lexer<token_type> lexer_type;
#else
typedef lex::lexertl::static_lexer<
token_type,
lex::lexertl::static_::lexer_si
> lexer_type;
#endif
现在使用静态词法分析器编译时,我收到错误
boost/spirit/home/lex/lexer/lexertl/static_lexer.hpp(230):
error C2039: 'add_action' : is not a member of 'boost::spirit::unused_type'
当一个人使用语义操作但忘记将lexer
更改为actor_lexer
时,这正是所期望的。我确实在生成器程序中使用了actor_lexer
类型,据我所知,它似乎有效。
我还缺少什么吗?还是目前无法在静态词法分析器中使用语义操作?
在这种情况下,有一个static_actor_lexer
模板,如本例所示。
lex::lexertl::static_actor_lexer<
token_type, lex::lexertl::static_::lexer_wcl
>
相关文章:
- 警告处理为错误这里有什么问题
- "error: no matching function for call to"构造函数错误
- boost::进程间消息队列引发错误
- C++,OpenCV,尝试显示图像时"OpenCV(4.3.0) Error: Assertion failed (size.width>0 && size.height>0)"此错误
- 有关插入适配器的错误。[错误]请求从 'back_insert_iterator<vector<>>' 类型转换为非标量类型
- QT在错误的班级中寻找空位
- vector.resize()中的分配错误
- 代码在main()中运行,但在函数中出现错误
- 释放错误后堆使用
- (C++)分析树以计算返回错误值的简单算术表达式
- Project Euler问题4的错误解决方案
- 我的字符计数代码计算错误.为什么
- 从"int*"强制转换为"unsigned int"会丢失精度错误
- 尝试导入pybind-opencv模块时出现libgtk错误
- CMake项目Boost库错误:Boost/config/compiler/gcc.hpp:165:10:致命错误:cs
- 在某些循环内使用vector.push_back时出现分段错误
- MSVC多行宏编译器错误
- 在生成Actor(虚幻引擎4)时出现错误
- Visual Studio给出了关于模糊actor的错误
- 提升精神:错误 C2664,无法将"const boost::p hoenix::actor"<Eval>转换为"char"