Commit Graph

4777 Commits

Author SHA1 Message Date
Mike Gresens
9a562de232
Merge pull request #328 from octopus-prime/fix_for_trac_5983
Stack overflow with Karma floating point generator
2017-12-18 12:03:25 +01:00
Nikita Kniazev
da4f1ed122 Classic: Fixed unused parameter warnings 2017-12-18 02:21:28 +03:00
djowel
19c29c583f Fixed sequence operator typo (<< to >>). 2017-12-18 06:25:28 +08:00
Nikita Kniazev
2104d5f063 Karma.Tests: Fixed overflow in binary tests 2017-12-18 00:10:16 +03:00
Nikita Kniazev
11a36a0ce2 Remove unused boost/foreach.hpp includes 2017-12-17 20:14:56 +03:00
Nikita Kniazev
5b061a1130 Qi.Repository: Some header moving between keywords and kwd 2017-12-17 20:14:56 +03:00
octopus-prime
cf769b145f Trigger appveyor 2017-12-17 13:14:04 +01:00
Nikita Kniazev
9954b8467b Qi: permutation: Use array::fill instead of BOOST_FOREACH loop 2017-12-17 04:25:05 +03:00
Nikita Kniazev
c5411ad237 X3: Reenable fusion::map support
`build_container<char>` specialization was added in 84c0c075 (#5)
2017-12-17 01:02:27 +03:00
Nikita Kniazev
60c971df52 Karma: Fix truncation warning if attribute is wider than binded value
Actually the warning here is a sign of bad design. Attribute should go directly
to sink, and there will be no truncation warning except a situation when sink
is not wide enough for attribute or binded value.
2017-12-16 22:11:37 +03:00
Nikita Kniazev
602a406c12 Tests: char1: Fixed typo leading to wchar_t to char truncation warning 2017-12-16 22:11:37 +03:00
Mike Gresens
60031eb779 Fix container traits for msvc (#318)
- Fixes #298 and is based on 45902cbb4e provided by @Kojoley 
- Added container_support.cpp to x3 test suite again
2017-12-16 22:10:00 +03:00
Nikita Kniazev
1af11db105
Merge pull request #325 from Kojoley/use-cxx-template-depth-feature
Use `<c++-template-depth>` feature
2017-12-15 16:21:46 +03:00
Nikita Kniazev
20a63aa976
Merge pull request #324 from Kojoley/lex-generated-lexer-newline_in_constant
Lex: Fixed C2001 'newline in constant' warning in generated lexers
2017-12-15 16:21:30 +03:00
Nikita Kniazev
fc5a0cd181
Merge pull request #323 from Kojoley/fix-classic-disabled-threads
Classic: Fix compilation with BOOST_DISABLE_THREADS defined
2017-12-15 16:21:14 +03:00
octopus-prime
26c782c229 Replaced tabs by spaces 2017-12-15 11:44:51 +01:00
octopus-prime
6a4547ca43 Added fix and test from trac # 5983 2017-12-15 11:29:46 +01:00
Nikita Kniazev
d526cd1931 Use <c++-template-depth> feature 2017-12-15 01:12:06 +03:00
Nikita Kniazev
3d6f2c9bce Lex: Fixed C2001 'newline in constant' warning in generated lexers
Closes https://svn.boost.org/trac10/ticket/11540.

Actually this should have been caught by `regression_matlib_generate_switch`
test, but it is not complex enough to cover all cases. We do not have the
coverage reports yet, but the fix is trivial so I think it is ok.
2017-12-14 21:53:27 +03:00
Nikita Kniazev
2d7dcd9f6e Classic: Fix compilation with BOOST_DISABLE_THREADS defined
Closes https://svn.boost.org/trac10/ticket/12639
2017-12-14 21:26:53 +03:00
Nikita Kniazev
18d0d721db
Merge pull request #322 from Kojoley/add-appveyor-ci
Add Appveyor-CI
2017-12-14 00:11:47 +03:00
Nikita Kniazev
d39d94bd08 Add Appveyor-CI 2017-12-12 20:40:07 +03:00
Joel de Guzman
b10e4a477b
Merge pull request #320 from think-cell/thinkcell_iterator_check
ForwardIterator -> ReadableIteratorConcept & ForwardTraversalConcept
2017-12-11 08:02:09 +08:00
djowel
6de1792825 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. 2017-12-09 11:26:37 +08:00
Nikita Kniazev
d3cbd18af4
Merge pull request #310 from Kojoley/sequential_or-random-order-bug
sequential_or: Fixed random order execution of underlying parsers
2017-12-08 19:48:23 +03:00
Nikita Kniazev
109253ac8c
Merge pull request #319 from Kojoley/fix-qi-permutations-always-initializes-optionals
Qi: Permutations parser always initializes optionals
2017-12-08 19:46:40 +03:00
Mike Gresens
7be39f28d0
Merge pull request #317 from octopus-prime/phoenix_links
Fix phoenix links
2017-12-08 12:45:31 +01:00
Han Wang
766cc4c9b7 ForwardIterator -> ReadableIteratorConcept & ForwardTraversalConcept
The concept of ForwardIterator is flawed because it mixed 2 sets of concepts (value access and traversal) into 1 package.

http://www.boost.org/doc/libs/1_65_1/libs/iterator/doc/new-iter-concepts.html

It requires value_type (const)& as return type when dereference is applied, which is not mandatory in spirit parsing. A return type which is convertible to value_type is good enough. ReadableIteratorConcept and ForwardTraversalConcept should be what we need for the iterator check.

For example, the iterator of the range returned by boost::adaptors::transform(std::string, func) is normally not a ForwardIterator. But it fulfills ReadableIteratorConcept and ForwardTraversalConcept and should be able to be parsed by spirit.
2017-12-07 17:25:37 +01:00
Nikita Kniazev
3f18a6e99f Qi: Permutations parser always initializes optionals
Closes https://svn.boost.org/trac10/ticket/12473

Optional parser never fails so `attr = val;` always triggers and initializes
the `attr` value. The special case for optional attributes could be safely
removed as any underlying parser must already correctly handle optionals.
2017-12-07 17:59:04 +03:00
Mike Gresens
f5179c95bb
Merge pull request #316 from octopus-prime/parse_into_range
Parse into range
2017-12-07 11:57:57 +01:00
octopus-prime
a4a2a0ee6b Fix phoenix links 2017-12-06 21:29:43 +01:00
octopus-prime
cb2750792e Test for trac ticket 12928 "x3 cannot synthesize attribute of type
boost::iterator_range in a sequence parser"
2017-12-06 19:28:04 +01:00
octopus-prime
52de6d17ba Fix for trac ticket 12928 "x3 cannot synthesize attribute of type
boost::iterator_range in a sequence parser"
2017-12-06 19:19:08 +01:00
Nikita Kniazev
e90bb7ca53
Merge pull request #315 from Kojoley/tests-qi-rule_fail-char_-ambiguous
Qi.Tests: rule_fail: Fixed ambiguous symbol 'char_'
2017-12-06 16:29:20 +03:00
Nikita Kniazev
3a2f074c2b Qi.Tests: grammar_fail, rule_fail: Fixed past-the-end pointer problem 2017-12-06 16:05:06 +03:00
Nikita Kniazev
5f93ee81d9 Qi.Tests: rule_fail: Fixed ambiguous symbol 'char_'
..\libs\spirit\test\qi\rule_fail.cpp(28): error C2872: 'char_': ambiguous symbol
boost/spirit/home/support/common_terminals.hpp(235): note: could be 'const boost::spirit::ascii::char_type boost::spirit::ascii::char_'
boost/spirit/home/support/common_terminals.hpp(237): note: or       'const boost::spirit::standard::char_type boost::spirit::standard::char_'
2017-12-06 16:05:06 +03:00
Nikita Kniazev
6e329cbf45
Merge pull request #313 from Kojoley/fix-include-guard-names-collision
X3: Fixed include guard names collision
2017-12-06 13:51:53 +03:00
Nikita Kniazev
9448f43b82
Merge pull request #314 from Kojoley/repository-no-predifined-terminals-compatability
Fixed problems with BOOST_SPIRIT_NO_PREDEFINED_TERMINALS
2017-12-06 13:51:37 +03:00
Nikita Kniazev
d58e26ed73 Karma: attr_cast: Wrong BOOST_SPIRIT_NO_PREDEFINED_TERMINALS ifndef 2017-12-05 21:31:54 +03:00
Nikita Kniazev
1c48ce8d1a Qi.Repository: advance: Add missing include 2017-12-05 20:40:14 +03:00
Nikita Kniazev
4d8ce7024d Qi.Repository: keywords: Added missing include 2017-12-05 20:40:14 +03:00
Nikita Kniazev
332d267d67 Qi.Repository: kwd: Added missing include 2017-12-05 20:40:14 +03:00
Nikita Kniazev
d0d9f67407 Repository: Fix compilation with BOOST_SPIRIT_NO_PREDEFINED_TERMINALS 2017-12-05 17:57:40 +03:00
Nikita Kniazev
cb946ba083 X3: Fixed include guard names collision 2017-12-05 17:01:05 +03:00
Mike Gresens
5a720737af
Merge pull request #312 from octopus-prime/develop
error_handler test msvc-14.0
2017-12-05 09:38:27 +01:00
octopus-prime
868689ff40 error_handler test msvc-14.0 2017-12-05 00:23:33 +01:00
octopus-prime
b6fa1404fa Added missing dependency to filesystem for error_handler test. 2017-12-04 17:46:52 +01:00
Nikita Kniazev
6a37fde4ca sequential_or: Fixed random order execution of underlying parsers
After two hours of fighting with the optimizer, I happily drew attention to
this little nifty bitwise operator in `any_if_ns` function.

Explanation of the bug: bitwise inclusive OR operator is not a sequence point
(per chapter §5.13 of C++14 standard), that's why at compiling the expression
`a() | b() | ... | z()` optimizer is allowed to rearrange the execution order
of the functions `a`, `b` ... `z`.

There is high chance that a lot of people were misguided by the bug and chose
not to use `sequential_or`.

I vaguely remember how about three years ago I thought that I am dumb and/or
the documentation is wrong when I tried to use the `sequential_or` but ended
with some workaround.

There are three possible fixes:
  - This one
  - Make the original `any_ns` and `any_if_ns` strict ordered
    (could potentially make permutations operator slower)
  - Break the `any_ns` and `any_if_ns` API and somehow generalize the code
2017-12-04 18:28:50 +03:00
Mike Gresens
b476a28af7
Merge pull request #304 from octopus-prime/line_pos_iterator_fix3
Line pos iterator fix3
2017-12-04 14:01:50 +01:00
octopus-prime
fa2bfb1c52 Added tests for error_handler 2017-12-04 12:56:43 +01:00