2382 Commits

Author SHA1 Message Date
Joel de Guzman 4a7cdc23e0 nullary semantic actions allowed 2014-04-02 02:04:41 +08:00
Joel de Guzman 7b0d142492 semantic actions with context only (no attributes) 2014-04-02 01:52:19 +08:00
Joel de Guzman 99337861f8 + Using -std=c++1y
+ Using polymorphic lambda on semantic actions
2014-04-01 18:54:33 +08:00
Joel de Guzman 23448524c7 Merge pull request #5 from redbaron/char-container-std-string
use std::string as a container for char
2014-04-01 10:53:55 +08:00
Joel de Guzman df2e019830 Merge branch 'parse-into-fusion-map' of https://github.com/redbaron/spirit into redbaron-parse-into-fusion-map
Conflicts:
	test/Jamfile
2014-04-01 10:50:51 +08:00
Joel de Guzman f6b78c4464 Merge branch 'lit-leaks-attribute' of https://github.com/redbaron/spirit into redbaron-lit-leaks-attribute
Conflicts:
	test/Jamfile
	test/x3/sequence.cpp
2014-04-01 10:47:57 +08:00
Joel de Guzman 5e1c8a2dd8 Merge pull request #8 from redbaron/fix-one-element-seq
Fix one element seq
2014-04-01 10:25:52 +08:00
Joel de Guzman 01608a1294 added missing unused.hpp file 2014-04-01 08:28:30 +08:00
Joel de Guzman b23c6c741b Merge branch 'develop' 2014-04-01 08:21:32 +08:00
Joel de Guzman 5368c19e4c - fixed move_to handling when src and dest are the same
- added jamfile
2014-04-01 08:09:21 +08:00
Maxim Ivanov 6f5e169987 Move move_to condition to template
Even if branch is never taken it still must be compiled
properly, which can cause compile errors. Moving condition
to template eliminates branching.
2014-03-26 09:52:28 +00:00
Maxim Ivanov 8ea47e5025 Fix for the case when fusion assoc seq is on either side of seq 2014-03-26 09:52:28 +00:00
Maxim Ivanov 19d2da2f5b Support alternative over keys to be used as a key for fussion assoc
Adds support for parsers like:
auto key1 = lit("key1=") >> attr(key1());
auto key2 = lit("key2=") >> attr(key2());
auto value = int();
auto pair = key1|key2 >> value;

where attribute passed to pair.parse() is fusion associative sequence
2014-03-26 09:44:43 +00:00
Maxim Ivanov bb16f871ae Merge branch 'fix-one-element-seq' into parse-into-fusion-map 2014-03-25 10:14:57 +00:00
Maxim Ivanov 58e177beb7 Support parsing into fusion adapted structs 2014-03-25 10:14:46 +00:00
Maxim Ivanov 2f1659413b Fix for sequences with only one element producing attr
If in a sequence only one element produces attribute, then make whole
sequence to produce that attribute,rather than wrapping it into
fusion::deque. Not doing so breaks alternative<> parser, when such
sequences are on left and right side of it, because it then generates
variant attribute over fusion:deque<> attributes, which is not
what it is supposed to do. Plus it breaks traits::move_to when both
source and destination are single element fusions sequences. Hence this
fix to put everything back to normal for this edge case.
2014-03-24 23:48:28 +00:00
Maxim Ivanov 641029c983 Avoid needless construction of sequence<> parser 2014-03-20 11:25:22 +00:00
Maxim Ivanov b11cfb5bc5 Make it possible to parse 2 element sequences directly into fusion map
If parser produces 2 element tuple, then fusion::map can be passed
as an attribute to it. Type of first element in produces tuple is used
as a key and second element is a value stored in map.

Few notes how does it work:
- parsing to fusion::map is treated as parsing to container
- special parse_into_container logic call's parser with it's native
  attribute type (fusion::deque<> for sequences) and then updates
  fusion::map with values from it.
2014-03-20 11:25:22 +00:00
Joel de Guzman af07ca7300 Merge branch 'origin/develop' 2014-03-20 12:34:15 +08:00
Maxim Ivanov 34ff12be41 unify built container for single element fusion::deque
continue to reduce variety of containers floating inside instantiated
templates.
2014-03-19 23:33:46 +00:00
Maxim Ivanov 676f1f882a make x3::omit[] fail at compile time if it is called with non-unused_type attr
It should never be called with anything but unused_type attribute
anyway, but if something did it due to error it is better to be safe and
fail at compile time rather than unexpectedly  update attribute, which
could lead to hard to detect errors.
2014-03-19 22:53:48 +00:00
Maxim Ivanov 4f97aa987c stop x3::lit from updating passed container 2014-03-19 22:34:31 +00:00
Maxim Ivanov 84c0c07546 use std::string as a container for char
That is what normally users would pass, so in some situations it
can avoid copying data.
2014-03-19 19:39:13 +00:00
Maxim Ivanov 2d862e1d8d Fix for parsing sequences with x3::unused attribute 2014-03-18 18:21:40 +00:00
Joel de Guzman 0262419033 fixed wrong include guard 2014-03-18 11:33:10 +08:00
Joel de Guzman 8a35332835 Merging Spirit x3 into devel 2014-03-18 11:06:19 +08:00
Joel de Guzman c2c8d6ace2 moving headers to include to mimic modular boost structure 2014-03-18 10:30:47 +08:00
Yuri Khan bdf4fd8d28 Fix attribute_size<optional<T> > 2014-03-03 15:19:12 +07:00
K-ballo 76f65843ce Added changes needed by resolution of #7730 2014-02-20 20:04:28 -06:00
Joel de Guzman 5df5b42f7c merging from develop 2014-01-22 22:33:33 +08:00
Joel de Guzman ca8ca3c729 Merge branch 'develop'
Conflicts:
	doc/what_s_new.qbk
	example/qi/compiler_tutorial/Jamfile
	example/qi/compiler_tutorial/conjure2/error_handler.hpp
	example/qi/typeof.cpp
	include/boost/spirit/home/karma/detail/pass_container.hpp
	include/boost/spirit/home/karma/nonterminal/rule.hpp
	include/boost/spirit/home/karma/operator/alternative.hpp
	include/boost/spirit/home/karma/operator/sequence.hpp
	include/boost/spirit/home/karma/string/symbols.hpp
	include/boost/spirit/home/lex/lexer/lexer.hpp
	include/boost/spirit/home/lex/lexer/support_functions.hpp
	include/boost/spirit/home/lex/qi/plain_tokenid.hpp
	include/boost/spirit/home/qi/copy.hpp
	include/boost/spirit/home/qi/nonterminal/rule.hpp
	include/boost/spirit/home/qi/stream/stream.hpp
	include/boost/spirit/home/qi/string/symbols.hpp
	include/boost/spirit/home/support/attributes.hpp
	include/boost/spirit/home/support/auto.hpp
	include/boost/spirit/home/support/extended_variant.hpp
	include/boost/spirit/home/support/info.hpp
	include/boost/spirit/repository/home/qi/directive/kwd.hpp
	include/boost/spirit/repository/home/qi/operator/detail/keywords.hpp
	repository/test/qi/keywords.cpp
	test/karma/regression_container_variant_sequence.cpp
2014-01-22 22:18:57 +08:00
Joel de Guzman 1d9633a9c9 Support for BOOST_SPIRIT_AUTO and qi::copy.
[SVN r76928]
2014-01-22 21:30:28 +08:00
Joel de Guzman cf9db449ce Fixed problem with handling BOOST_FUSION_ADAPT_ADT
[SVN r74291]
Applied patch (ticket 5716)
https://svn.boost.org/trac/boost/attachment/ticket/5716/spirit_wide_what.patch

[SVN r74292]
Reverting patch. The tests are broken with the patch!

[SVN r74293]
Fix Ticket #5867

[SVN r74299]
- using LLVM 2.9 release
- added bjam for msvc

[SVN r74310]
Fix Ticket #5867

[SVN r74323]
adding the target location in the project requirements to generate the exe in the same directory.

[SVN r74324]
Added explicit qualification for ref to avoid conflict with std::ref

[SVN r74413]
seek directive by TONGARI

[SVN r74796]
Preparing docs for release

[SVN r74709]
seek directive by TONGARI

[SVN r74797]
Adding safe-guards

[SVN r74831]
typo fix

[SVN r74837]
Spirit: Removing bogus static_assert

[SVN r74838]
Added rvalue support for rule %=

[SVN r74876]
Added rvalue support for rule %=

[SVN r74877]
Added rvalue support for rule %=

[SVN r74878]
Spirit: adding rvalue reference overload for lexer::operator+=(), fixes regressions caused by recent proto changes

[SVN r74892]
Added rvalue support for symbols %=

[SVN r74905]
Added rvalue support for symbols %=

[SVN r74906]
Replace spirit and phoenix documentation with a redirect.

[SVN r74983]
Spirit: applying Vitaly Budovski's patch adding binary floating point parsers and generators

[SVN r75105]
Docs for the seek directive

[SVN r75108]
Docs for the seek directive

[SVN r75321]
C++11 patches by Michel Morin

[SVN r75395]
Spirit: adding get<> overload to extended_variant

[SVN r75469]
+ more get overloads
+ returning references instead of values

[SVN r75484]
Spirit: fixing check for Boost version for endian, when will we finally get that library?

[SVN r75710]
added longest match test

[SVN r75735]
Spirit: fixed #6253: lex::lexertl::generate_static_dfa compiler errors if lexer has wchar_t as underlying stream type

[SVN r75910]
Spirit: making sure qi::attr is in the documentation index

[SVN r75916]
fixes Ticket #6259

[SVN r75931]
Spirit: fixed #6284: qi_parsers/numeric.htm documentation defects

[SVN r76022]
Spirit: disambiguate cref.

[SVN r76046]
Spirit: fixed spelling (fixed #6003: occured is spelled occurred)

[SVN r76152]
Spirit: fixed spelling (fixed #6003: occured is spelled occurred)

[SVN r76153]
Spirit: added a missing typename

[SVN r76194]
Spirit: improving error reporting from lexer tokens

[SVN r76248]
Spirit: fixing copy/paste error

[SVN r76284]
Spirit: fixing signed/unsigned mismatch warning

[SVN r76285]
Spirit: changing c-style cast to static_cast

[SVN r76289]
Spirit: Fixing problems in karma::center[] directive

[SVN r76381]
Spirit: fixed karma::subrule

[SVN r76382]
Spirit: fixed Karma examples

[SVN r76383]
Spirit: fixed #6368: [multi_pass] clear_queue isn't forwarded to the storage policy

[SVN r76384]
Spirit: updating docs

[SVN r76385]
Spirit: Fixed a problem in Karma when a variant holding a container was used as a generator inside a sequence.

[SVN r76462]
Removing deprecated headers

[SVN r77230]
Added note on the removal of deprecated headers.

[SVN r77243]
Fix: still no Boost.Endian available

[SVN r77400]
teajay's keyword patches

[SVN r77428]
fix for identifier rule not allowing identifiers that start with a keyword (e.g. fortify)

[SVN r77966]
Solving the darn endian problem in Spirit once and for all. I should have done this a long time ago.

[SVN r78156]
patches from teejay

[SVN r78313]
Whitespace should be + not *.

[SVN r78358]
Big fix allowing "script" greater that 63

[SVN r78524]
Missing `endsect` in spirit docs.

[SVN r78732]
Fixed wrong link

[SVN r78905]
Update classic spirit tests which use boost::TIME_UTC (now TIME_UTC_).

[SVN r79653]
Fixed char->char_type

[SVN r79764]
Fix #4372: spirit::info violates STL container requirements

[SVN r80121]
test overlapping symbols

[SVN r80800]
#7431 Warning fixes in spirit

[SVN r80815]
readding proper file structure

[SVN r81004]
Spirit: Fixing inspect problems

[SVN r81794]
Spirit: More inspect fixes

[SVN r81795]
Spirit: Fixing problem in result size computation for Karma sequence involving variants

[SVN r81896]
Spirit: another attempt to fix the sequence compilation problem in Karma when variants are involved

[SVN r81910]
Spirit: applying final patch for variant/sequence issue in Karma

[SVN r81917]
Spirit: adding missing 'const'

[SVN r81926]
Spirit: Adding proper return type handling to variant visitor

[SVN r81928]
Spirit: cleaning up visitor

[SVN r81929]
Spirit: made it finally compile again.

[SVN r81938]
Spirit: applying patch fixing qi::stream EOF behavior

[SVN r82078]
Spirit: fixing inspect errors

[SVN r82191]
Additional msvc warning removal

[SVN r82347]
Fix #7900: karma indirect_iterator returns reference to temporary

[SVN r82521]
Fix #8381: karma::uint_generator fails to compile in C++11 mode

[SVN r83776]
Spirit: making sure destructor of temporary stream is called in the right places

[SVN r83926]
Fix #8066: Conflict with Boost.Log on GCC 4.4

[SVN r84118]
Fix #8563: Compilation error with boost::spirit::lex::less actor

[SVN r84285]
Fixes #9027

[SVN r85415]
Spirit: Fixing clang regressions

[SVN r85421]
Simplified code for overflow handling: looking at the code i see now that it is actually safer to always check for overflow by default. most architectures have 2s complement anyway, so the optimization only happens on some obscure architecture where ints do not wrap (also for floats--they do not wrap as well). i'll simply have ints check for overflow *always* and provide a CP for special types that the user can specialize for optimization.

[SVN r85440]
Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

Process #ifdef...#endif blocks.

[SVN r86243]
Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

Process #ifndef...#else...#endif blocks.

[SVN r86245]
Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

Process #ifdef...#else...#endif blocks.

[SVN r86246]
Restored check for unsupported compilers

[SVN r86387]
Add Boost.Build support for the Git modular layout, using links to to new header locations, thus preventing breakage to vast amounts of user code and build setups. Being added to SVN so that changes will automatically propagate to Git and modular Boost. Thanks to Steven Watanabe, Jürgen Hunold, Vladimir Prus, and Bjørn Roald for developing this patch. Steven in particular conceived the approach and did the initial implementation, which was further refined by the other contributors.

[SVN r86392]
Removing phoenix-2 for good ( good bye I will miss you )
2014-01-22 20:54:33 +08:00
K-ballo f14c110dd0 More work for supporting new boost::variant interface 2014-01-21 19:08:26 -06:00
Jürgen Hunold 7a21658eaf use BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES to select variadic macro support code 2014-01-21 19:08:25 -06:00
K-ballo f86068f830 Fixed #9238: BOOST_VARIANT_USE_VARIADIC_TEMPLATES support 2014-01-18 14:15:14 -06:00
K-ballo 1470417fa4 Fixed issue with EOF in stream parser 2013-12-14 21:55:33 -06:00
K-ballo c7983a0b28 Fixed issue with mutable applied to references in pass_container 2013-12-14 14:08:24 -06:00
Joel de Guzman c0537c8251 Removing phoenix-2 for good ( good bye I will miss you ) 2013-12-14 09:52:07 +08:00
Agustín K-ballo Bergé c1597829ba Restored check for unsupported compilers
[SVN r86387]
2013-10-22 00:10:55 +00:00
Andrey Semashev 57c788714e Fixed missing #includes that broke Boost.Log compilation.
[SVN r86331]
2013-10-16 14:49:13 +00:00
Hartmut Kaiser de26ca955c Merging from trunk
[SVN r86266]
2013-10-12 17:46:00 +00:00
Stephen Kelly 17c6d9d699 Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifdef...#else...#endif blocks.

[SVN r86246]
2013-10-11 23:19:17 +00:00
Stephen Kelly b5d0c2f3c9 Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifndef...#else...#endif blocks.

[SVN r86245]
2013-10-11 23:17:48 +00:00
Stephen Kelly d16398ac3b Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifdef...#endif blocks.

[SVN r86243]
2013-10-11 23:13:10 +00:00
Stephen Kelly f936e6710f Spirit: Remove obsolete GCC version checks.
[SVN r86061]
2013-09-30 15:56:04 +00:00
Stephen Kelly 3807071c42 Spirit: Remove obsolete MSVC version check.
[SVN r86034]
2013-09-30 00:20:31 +00:00
Stephen Kelly 39dd7666e7 Remove obsolete MSVC check from pragma guard
git grep -h -B1 "^#\s*pragma once" | grep -v pragma | sort | uniq

is now clean.

[SVN r85952]
2013-09-26 13:02:51 +00:00
Agustín K-ballo Bergé 1247e4b4a6 Silence int to bool conversion warnings
[SVN r85924]
2013-09-26 00:16:19 +00:00
Stephen Kelly c33e14c4e7 Spirit: Remove obsolete MSVC version checks
[SVN r85906]
2013-09-25 13:53:02 +00:00