- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在将一个手写解析器迁移到 Boost.Spirit (2.5.4)。第一印象是积极的,但由于我使用的是 C++17,X3 似乎是一个非常有吸引力的选择。
幸运的是,有很多关于 X3 的可用资源:
最佳答案
Spirit X3 正在生产中使用(开发人员在邮件列表中说明了这一点)。
它严格来说仍然是“测试版”:接口(interface)和实现可能会发生变化。
总而言之,我认为它确实提供了。如果您非常需要 Qi 的 qi::locals<>
之类的东西,可能会出现一些怪癖/皱纹。或在递归规则中切换船长。
只要您牢记这些,您就会发现 X3 与 Qi 相比使用起来轻而易举,主要是由于核心语言集成(可组合性是 IMO 的最大胜利)。
你可以扫一扫(我的)boost-spirit-x3这个网站上的答案。 (并非所有答案都针对这样标记的问题,因此请考虑搜索文本“x3”)。
发展 did not stop :
$ git log --all --oneline --decorate --date-order \
--after=2014-7-1 --graph -- include/boost/spirit/home/x3
* ea57c257f Prevent parse_nan() from dereferencing out of range iterator
* 1433de2fe X3: Remove unused function_types includes
* 5bd4d1061 X3: Dereference a single item view instead of unwrapping sequence
* 6cd3d3a08 fix sequence partitioning problem (reverted from commit a8e391bd99dddb3f9ece84bdb1bb9236b0a37cf7)
* 9bdbf6bd2 X3: Fixed iterator move_to to single item sequence
* c5411ad23 X3: Reenable fusion::map support
* 60031eb77 Fix container traits for msvc (#318)
* b10e4a477 Merge pull request #320 from think-cell/thinkcell_iterator_check
|\
* | 6de179282 If there's ambiguity in attribute_category on container_attribute or tuple_attribute (e.g. array and std::array), choose tuple_attribute. We probably should define is_container better.
| * 766cc4c9b ForwardIterator -> ReadableIteratorConcept & ForwardTraversalConcept
|/
* 52de6d17b Fix for trac ticket 12928 "x3 cannot synthesize attribute of type boost::iterator_range in a sequence parser"
* cb946ba08 X3: Fixed include guard names collision
* 5ec71cfd3 Merge pull request #307 from octopus-prime/optional_attribute
|\
* \ 1265ee169 Merge pull request #120 from mlang/x3/implicit
|\ \
* \ \ deab0a261 Merge pull request #109 from mlang/x3/repeat-kleene-auto
|\ \ \
* | | | 6d6f40c3e X3: Workaround VS2015 rvalue ref in template of noexcept expression bug
* | | | a30e517b1 X3: Workaround VS2015 decltype in function arguments bug
| | | * c3a83ce08 optional_attribute
| |_|/
|/| |
* | | b8b82630a fix x3::uint_parser<T(signed)> overflow problem
* | | 690830713 Replaced tab by spaces.
* | | 74f67517c Bugfix and tests for issue #287 "x3 cannot parse into associative containers anymore".
* | | ee4943d58 X3: Fix `unused_type` attribute case in `parse_into_container`
* | | 79995f7e8 x3::error_handler::position() CR+LF lines wrongly counted.
* | | b4e4762b6 Add noexcept specs to x3::variant and forward_ast
* | | 19972887f Context& -> Context const&
* | | 30dfb6230 simplify with directive (3): make rvalue injection mutable
* | | 361b12eee simplify with directive
* | | 1f513cb40 Revert "Crash when print attribute in debug mode."
* | | e7962ea67 Update simple_trace.hpp
* | | 8c7f9c071 Update and_predicate.hpp
* | | ca335f30f Fix dangling refs in debug of call_rule_defintion`
* | | cfa7446a8 silence unused parameter warning
* | | 16320a556 Check for unitialized rules in parser composition
* | | 6c1cab48f Avoid logic_error if rule was unitialized
* | | 29dc7ec6e Added BOOST_SPIRIT_NO_REAL_NUMBERS to not include float parsers
* | | 30c1d59d3 Make standard_wide and wchar_t optional for platforms that do not support
* | | 1d5620fef Update rule.hpp
* | | 379413a50 Fixed bug where string("string1") >> attr(std::string("string2")) produces the wrong attribute result
* | | 124fda502 fix wrong out commented parameter in x3::detail::make_rule_context(...)
* | | 8357037e8 use ignore_unused instead of C-cast to void
* | | a1a30d431 Suppress 'unused parameter' warnings in x3::parse_rule(...)
* | | 5c782ee5e Suppress 'unused parameter' warnings in x3::detail::make_unique_context(...)
* | | 672391030 Suppress 'unused parameter' warnings in x3::detail::move_if_not_alternative::call(...)
* | | 5b1a433d2 Suppress 'unused parameter' warnings in x3::detail::parse_into_container_base_impl::call(...)
* | | 10286fafa Suppress 'unused parameter' warnings in x3::detail::call(...)
* | | 96272e324 Suppress 'unused parameter' warnings in x3::get_info::operator()(...)
* | | 3063a043c Suppress 'unused parameter' warnings in x3::lazy_semantic_predicate::parse(...)
* | | ce02014df Suppress 'unused parameter' warnings in x3::attr_parser::parse(...)
* | | c3f97a461 Suppress 'unused parameter' warnings in rule.hpp
* | | 277cdf777 Suppress 'unused parameter' warnings in container_traits.hpp
* | | a19bcb5b7 Suppress an "unused parameter" warning of rule_
| | | * 8616d3ff3 Update exposed attribute for alternative parser
| |_|/
|/| |
* | | de81dc44d Using boost TTI library to replace hand-written TTI code.
* | | b818ca5c8 - added x3 variant test - added x3 variant, extended variant swap member function
* | | 76c57b600 call c.insert(iter, f, l) or c.inser(f, l) as appropriate depending on container type.
* | | 2085a9f50 dangling reference to attribute when BOOST_SPIRIT_X3_DEBUG is defined
* | | 9e488859d Fixes for ticket https://svn.boost.org/trac/boost/ticket/12094
* | | c447315c1 Use forward<T> as appropriate
* | | a077a4cae fixes problem with move_to
* | | 7690022b9 Bigfix: with_context should not return const context. doing so will introduce type conflicts and linker errors
* | | 82bd5b2cc fixes problem with BOOST_SPIRIT_X3_DEBUG.
* | | d98a7dc9f Merge pull request #175 from octopus-prime/develop
|\ \ \
| * | | a39923104 Use std::basic_string<Char> instead of Char*
* | | | 035fc0fd9 - added static assert on phrase_parse to make sure user does not pass in unused_type skipper - fixed symbols parser bug (fixes ticket 12016)
* | | | 3cee512a4 Merge pull request #170 from octopus-prime/develop
|\ \ \ \
| |/ / /
| * | | 8602d2b8e Replaced cend() by end().
| * | | 0037392a7 Changed push_back(unused_type, T const&) to push_back(unused_type, T&&).
* | | | a8e391bd9 fix sequence partitioning problem
* | | | d91cf7410 Fixes Ticket #11952
| * | | 9c2bc9f34 size calculation in has_reserve_method case only.
| * | | 1fbe050ef Replaced c.end() by c.cend(). Replaced std::integral_constant<bool, detail::has_reserve_method<Container>::value>() by typename detail::has_reserve_method<Container>::type{}.
| * | | 045216a5c Add and use has_reserve_method construct to determine whether container has reserve() method.
| * | | 27d3352ec Added reserve optimization for std::vector and std::basic_string
| * | | c014a081b Cleaned up container_traits.
|/ / /
* | | c31e79efa Using insert() method of containers in push_back().
* | | cec9817bc Added support for std::multimap, std::unordered_map and std::unordered_multimap.
* | | a362319f3 X3: fix char_range boundaries
* | | 2df3b8885 Merge pull request #110 from mlang/x3/error_handler.position_of
|\ \ \
* \ \ \ 949e49979 Merge pull request #132 from bebuch/develop
|\ \ \ \
* | | | | b42df6fe5 X3: Fix parse_sequence with variant_attribute.
| * | | | 5dadb838c return type via decltype(auto)
|/ / / /
* | | | 509029d24 remove include duplicate
* | | | 9b0daf9cc X3: Less is more.
* | | | d109f01de X3: We do not need integer_sequence.hpp.
* | | | 090e7a056 X3: Simplify operator>.
* | | | 391cbb2f2 X3: Use decltype instead of result_of.
* | | | c6aba10d5 Merge pull request #124 from mlang/x3/context/decltype-auto
|\ \ \ \
| * | | | d6b5f0d92 X3: Eliminate two more hidden cases of get_result.
* | | | | d87aa6846 X3: Add another missing const&.
|/ / / /
* | | | 20658b2b2 X3: Remove useless using-directives.
* | | | 6ede5f7c8 X3: [context] decltype(auto) makes get_result unnecessary.
| | | * 2f20512a3 X3: Make use of implicit constructibility.
| |_|/
|/| |
* | | 53352198f X3: Use inheritance instead of typedef typename ...::type type;
* | | af73c1c20 X3: Simplify alternative::parse.
* | | 1d7159ce0 X3: Avoid copying the arguments to {unary,binary}_parser, sequence and alternative.
* | | bc20650d9 X3: Remove unused include mpl/joint_view.hpp and add mpl/insert_range.hpp where appropriate.
* | | 2a94b18e9 X3: Fix push_back to mpl::view in x3::sequence.
| * | 2995de5fa Allow retrieval of the iterator_range of a position_tagged.
|/ /
| * c5b9823ae auto makes this simpler.
|/
* 0a7fadd83 Merge pull request #104 from teajay-fr/feature/x3_binary
|\
* | bec338319 Remove leftover pragma once
| * e1210dff4 Clean up and finalized the binary parser
* | 55e87419c c++11 coding style tweaks
* | 1c8d9b6e2 removing #pragma once clutter
| * d5f119779 Add support for the binary parsers
* | ad507e4da Fix include paths.
* | cea20165b - removing extensions - promoting stuff from extensions to directive
* | 10c13779b Rename {directive => extensions}/matches.hpp.
* | dc4c7f824 x3::matches.
|/
* 8bd4d7078 Add one space after 'for'.
* c13b91ac6 X3: No need for BOOST_FOREACH.
* 033e52c03 Make annotation.hpp generic and move to support/utility/annotate_on_success.hpp.
* 7404981b0 Use utf_to_utf in x3::error_handler.
* ac70d6f65 Allow rule.hpp to be included independently.
* 0debda097 Allow string/string_literal.hpp be able to be independently included.
* 20170960d bug fix x3: where we try to push_back to an mpl::view.
* c60d93fff bug fix for x3 where container attribute is substitute for the container value type. happens with recursive data structures such as vector<v> where v is a variant that also contains vector<v>.
* 0e17b6d05 reorganizing files into cleaner directory structures
* a3d667002 Making testing a full-fledged X3 suppoty utility
* c45fdad1b Bug fix: rule IDs must have accessible on_error and on_sucess
* 3627a4690 more test updates and cleanup
* 0adee06b2 cleaning up the tests
* 63e779a2e added version type
* 21dd555af Updated the check-for-self in x3::variant
* 14c87d616 specific support for puch_back and append to std::map
* c5fe8848c added explicit force_attribute bool template parameter to rule
* 5e4b0a7c8 X3 now works with g++4.9
* 2baddc5f2 fixed new symbols usage
* 729ffd680 Merge pull request #70 from mlang/error_reporting/without/line_pos_iterator
|\
* | c0ea389a1 Fix misplaced inline keyword.
| * 5d6dd28e8 Decouple error_reporting.hpp from line_pos_iterator.
* | 19ca8017b Add missing inline to avoid linker errors about duplicate definitions.
|/
* fec70d409 Merge branch 'x3-devel' into feature/x3_devlop_merge
|\
* | 9113f02e5 Macro to remove filesystem dependency
| * 6c0b5da3a Improved the formating
| * e4d195ef2 Merge branch 'x3-devel' of https://github.com/boostorg/spirit into feature/x3_no_case
| |\
| | * 92bd34bd7 Corrected the seperation of the literal string from their sizes in the any_char operator() Reactivated all the char set tests
| | * 7bde4c42f Add as_parser templates to handle on char strings as char_ instead of literal_string
| | * 134e30e75 Add support for char sets and char ranges
| | * a4e043101 Add the char_set and char_range parser
| | * eec3ff531 Fix the char encoding specific generators for all the string literal parsers
| * 1d6267610 Simplified the case sensitive/insensitive helpers
| * 60cca1161 Implement the no case directive for the symbols parser
| * ad9d0429a Use a less invasive case_compare type extraction from the context
| * 3f089ad13 Create a fresh no_case context for the skipper
| * 430cd5fee Add missing template keyword for clang
| * ea72c747a Make the char class parser no_case compatible. Make all no_case tests pass.
| * 1f01e9056 Use the same logic as the skipper to swap between case sensitive and case insensitive parsing.
| * c0dfd1416 Move the no case tag and the context extraction template to the support folder
| * 4b1fab071 Make no case directive compilable
| * 5a7495205 Add no case directive
* bcd6f561a Merge branch 'develop'
关于boost-spirit - Boost Spirit X3 量产准备好了吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48237777/
我正在尝试使用boost.spirit的qi库解析某些内容,而我遇到了一个问题。根据spirit docs,a >> b应该产生类型为tuple的东西。但这是boost::tuple(又名 fusio
似乎有/正在努力做到这一点,但到目前为止我看到的大多数资源要么已经过时(带有死链接),要么几乎没有信息来实际构建一个小的工作样本(例如,依赖于boost program_options 以构建可执行文
我对 Boost.Log 的状态有点困惑。这是 Boost 的官方部分,还是尚未被接受?当我用谷歌搜索时,我看到一些帖子谈论它在 2010 年是如何被接受的,等等,但是当我查看最后一个 Boost 库
Boost 提供了两种不同的实现 string_view ,这将成为 C++17 的一部分: boost::string_ref在 utility/string_ref.hpp boost::stri
最近,我被一家GIS公司雇用来重写他们的旧地理信息库。所以我目前正在寻找一个好的计算几何库。我看过CGAL,这真是了不起,但是我的老板想要免费的东西。 所以我现在正在检查Boost.Geometry。
假设我有一个无向图 G。假设我添加以下内容 add_edge(1,2,G); add_edge(1,3,G); add_edge(0,2,G); 现在我再说一遍: add_edge(0,2,G); 我
我使用 CMake 来查找 Boost。找到了 Boost,但 CMake 出错了 Imported targets not available for Boost version 请参阅下面的完整错
我是 boost::fusion 和 boost::mpl 库的新手。谁能告诉我这两个库之间的主要区别? 到目前为止,我只使用 fusion::vector 和其他一些简单的东西。现在我想使用 fus
这个问题已经有答案了: 已关闭10 年前。 Possible Duplicate: What are the benefits of using Boost.Phoenix? 所以我开始阅读 boos
我正在尝试获得一个使用 Boost.Timer 的简单示例,用于一些秒表性能测量,但我不明白为什么我无法成功地将 Boost.Timer 链接到 Boost.Chrono。我使用以下简单脚本从源代码构
我有这样的东西: enum EFood{ eMeat, eFruit }; class Food{ }; class Meat: public Food{ void someM
有人可以告诉我,我如何获得boost::Variant处理无序地图? typedef boost::variant lut_value;unordered_map table; 我认为有一个用于boo
我对 Boost.Geometry 中的环和多边形感到困惑。 在文档中,没有图形显示什么是环,什么是多边形。 谁能画图解释两个概念的区别? 最佳答案 在 Boost.Geometry 中,多边形被定义
我正在使用 boost.pool,但我不知道何时使用 boost::pool<>::malloc和 boost::pool<>::ordered_malloc ? 所以, boost::pool<>:
我正在尝试通过 *boost::fast_pool_allocator* 使用 *boost::container::flat_set*。但是,我收到编译错误。非常感谢您的意见和建议。为了突出这个问题
sau_timer::sau_timer(int secs, timerparam f) : strnd(io), t(io, boost::posix_time::seconds(secs)
我无法理解此功能的文档,我已多次看到以下内容 tie (ei,ei_end) = out_edges(*(vi+a),g); **g**::out_edge_iterator ei, ei_end;
我想在 C++ 中序列化分层数据结构。我正在处理的项目使用 boost,所以我使用 boost::property_tree::ptree 作为我的数据节点结构。 我们有像 Person 这样的高级结
我需要一些帮助来解决这个异常,我正在实现一个 NPAPI 插件,以便能够使用来自浏览器扩展的本地套接字,为此我正在使用 Firebreath 框架。 对于套接字和连接,我使用带有异步调用的 Boost
我尝试将 boost::bind 与 boost::factory 结合使用但没有成功 我有这个类 Zambas 有 4 个参数(2 个字符串和 2 个整数)和 class Zambas { publ
我是一名优秀的程序员,十分优秀!