Stefan Reinhold
45d9035a33
Skip newlines in binary decoding ( Fix #387 ) ( #616 )
...
* Skip newlines in binary decoding
This fixes #387
* Skip all whitespace characters
This also removes spaces and tabs in addition to newlines.
2018-09-03 15:55:45 -05:00
Antony Polukhin
b71e672caf
Suppress unused variable warning in release builds ( #611 )
2018-09-03 10:37:47 -05:00
Alexander
1698b47b65
Use nullptr instead of 0 or NULL (clang-tidy warns) ( #603 )
2018-07-02 23:59:04 -05:00
Alexander Karatarakis
0f9a586ca1
Fix _NOEXCEPT not available in VS2017 15.8. Use noexcept for VS2015+ ( #597 )
2018-06-30 16:23:28 -05:00
Jiao
4fb1c4b92b
Enable items to be removed from a sequence ( #582 )
2018-05-14 08:50:28 -05:00
maek
f996468a6a
Fix UTF-8 code points emitting ( #571 )
2018-03-24 10:48:39 -05:00
Denis Gladkikh
cfb7606a84
Fix tag parsing with () ( #532 )
2018-01-28 10:18:55 -06:00
Petr Bena
e2818c423e
Replace noexcept with macro compatible with VS ( #517 )
...
This way it's possible to build using older MSVC (<13) that don't
support this yet. Macro is undefined in each file where it is used so it
should stack well with other libs and sources.
2017-07-25 07:11:10 -05:00
Raul Tambre
3757b2023b
Fix compiler warnings in MSVC, #448 ( #453 )
2016-12-13 16:37:29 -05:00
Jens Breitbart
e3492bb3fa
Fix warnings generated by #438 (comparing unsigned value with <0).
2016-12-03 17:55:50 -06:00
Raul Tambre
8ff7d76e19
Fix compiler warnings about truncations.
2016-12-03 10:09:22 -06:00
Jens Breitbart
0f20ddcdcb
Fix -Wweak-vtables warnings in exception classes.
2016-12-03 09:58:44 -06:00
butataatawa
d025040049
Fix input strings with quotes giving "!" tagging artifacts.
2016-12-02 08:58:48 -06:00
Jesse Beder
b5b03bb9ad
Run clang-format.
2016-10-12 00:00:39 -05:00
Jesse Beder
086fec5c35
Fix formatting when writing \ as a character.
2016-10-11 23:58:03 -05:00
Joseph Langley
519d33fea3
Add YAML_CPP_API decorator to RegEx class and friend operators. ( #407 )
2016-08-18 08:47:09 -05:00
c0nk
f0b15cd6a0
Change node_map type from map<ptr,ptr> to vector<pair<ptr,ptr>> ( #386 )
...
* Change node_map type from map<ptr,ptr> to vector<pair<ptr,ptr>>
Map nodes are now iterated over in document order.
* Change insert_map_pair to always append
Always append in insert_map_pair even if the key is already present.
This breaks the behavior of force_insert which now always inserts KVs
even if the key is already present. The first insert for duplicated keys
now takes precedence for lookups.
2016-07-18 08:54:10 -05:00
Jesse Beder
728e26e426
Update doc, formatting for emit.h.
2016-05-12 23:23:05 -05:00
Jesse Beder
3392ab980e
Update doc, formatting for parse.h.
2016-05-12 23:20:03 -05:00
Jesse Beder
6c569e58b0
Update docs, formatting for Parser.
2016-05-12 23:13:55 -05:00
Jesse Beder
148da47114
Update documentation for Scanner and AnchorDict, and fix formatting.
2016-05-12 23:05:28 -05:00
Jesse Beder
a45a61742b
Remove ptr_stack<T>, in favor of vector<unique_ptr<T>>.
...
(Not stack<unique_ptr<T>> because it wasn't quite a stack; we needed to get the second-to-last element sometimes.)
2016-05-12 22:44:59 -05:00
Jesse Beder
7d2873ce9f
Fix scalar parsing when a line starts with a comment.
2016-04-02 16:02:26 -05:00
TripleWhy
52bcefa1f1
Make null handling YAML 1.2 compliant.
2016-04-01 17:14:59 -05:00
Scott Wolchok
005a6a19ee
Avoid copying cached RegExes for scalars
...
This improves performance on the test.yaml attached to #158 by about
25% on my machine as compared to the previous commit (0.25s -> 0.20s),
as measured by `time build/util/parse < test.yaml > /dev/null`.
2016-01-30 18:32:00 -06:00
Scott Wolchok
8c35a8ffab
Cache scalar regexes
...
This improves performance on the test.yaml attached to #158 by about
35% on my machine (0.39s -> 0.25s), as measured by
`time build/util/parse < test.yaml > /dev/null`.
2016-01-30 18:31:55 -06:00
Matt Blair
24fa1b3380
Replace Boost usage with C++11 features
...
- Adds 'std=c++11' compiler flags
- Replaces boost::type_traits with std::type_traits
- Replaces boost::shared_ptr with std::shared_ptr
- Replaces std::auto_ptr with std::unique_ptr
- Replaces raw pointers with std::unique_ptr in ptr_vector, ptr_stack, and SettingChanges
- Replaces boost::noncopyable with deleted copy and assignment operators
- Replaces boost::next with std::next
- Replaces boost::enable_if with std::enable_if
- Replaces boost::is_convertible with std::is_convertible
- Replaces ptrdiff_t with std::ptrdiff_t
- Replaces boost::iterator_facade and boost::iterator_adaptor with std::iterator, borrowing the 'proxy reference' technique from boost
- Removes Boost dependency from CMakeLists
- Formats changed files using clang-format
2016-01-10 22:44:15 -05:00
Jesse Beder
36fd93a8d5
Fix formatting when writing " as a character.
2016-01-10 12:08:42 -06:00
Oliver Hamlet
ec8aa4fa62
More useful error messages.
...
Applied the patch given in jbeder/yaml-cpp#200 with the correct code
style.
2015-04-02 20:50:11 +01:00
Jesse Beder
25c466a152
Run clang-format
2015-03-29 21:27:20 -05:00
Jesse Beder
1025f76df1
Fix memory leak when accessing a const Node with a key that doesn't exist.
2015-01-24 17:22:45 -06:00
Jesse Beder
a5e86cde59
Merge core
2015-01-24 16:30:27 -06:00
Jesse Beder
77c90a08e8
Refactor plain scalar validation in the emitter to precompute the invalid regexes
2015-01-24 16:29:57 -06:00
Jesse Beder
899b6614c1
Merge from core
2015-01-24 16:07:36 -06:00
Jesse Beder
bc86fd4aec
Force null to be quoted if written as a string
2015-01-24 16:07:10 -06:00
Jesse Beder
7d932f0a10
Merge from core
2015-01-24 15:59:24 -06:00
Jesse Beder
087e0673f3
Renamed the None enumeration vaules to NoType to avoid a collision with X11's macro
2015-01-24 15:58:14 -06:00
Jesse Beder
f1a889a0b9
Fix initialize ordering warning
2015-01-24 15:32:04 -06:00
Jesse Beder
391111c055
Merge core
2015-01-24 14:40:55 -06:00
Jesse Beder
570ab9d3fb
Fix unused arg warnings for EmitterStyle
2015-01-24 14:39:17 -06:00
Jesse Beder
0c8a539361
Fix warnings on visual studio, including changing unsigned to std::size_t
2015-01-24 14:38:22 -06:00
Jesse Beder
0c280724e9
Add flow/block style setting on Nodes
2015-01-24 13:11:43 -06:00
Jesse Beder
9880b608b9
Merge from core
2015-01-24 12:26:16 -06:00
Jesse Beder
ad712c4f2d
Add EmitterStyle, which will allow sequence or map style (i.e., flow or block) to be preserved between parsing and emitting
2015-01-24 12:19:20 -06:00
Jesse Beder
541fef1545
Merge from core
2014-03-25 22:07:21 -05:00
Jesse Beder
a499d2edad
Add missing include to scanscalar.cpp
2014-03-25 22:04:53 -05:00
Jesse Beder
13130ec20d
clang-format
2014-03-25 00:11:17 -05:00
Jesse Beder
3bd412ccc3
Merge from core
2014-03-23 20:25:13 -05:00
Jesse Beder
114db22335
Fix UTF16 parsing for multi-byte characters
2014-03-23 20:24:36 -05:00
Jesse Beder
253c80d09e
Merge from core
2014-03-23 20:17:34 -05:00
Jesse Beder
06bf012d81
clang-format
2014-03-23 20:08:54 -05:00
Jesse Beder
5a24459ea1
Merge ostream_wrapper fix from core
2014-03-22 23:22:14 -05:00
Jesse Beder
80bdfa6dba
Add missing include to otream_wrapper
2014-03-22 23:21:36 -05:00
Jesse Beder
4b40441cee
Run IWYU
2014-03-22 23:14:48 -05:00
Jesse Beder
8d7eb02c46
Merge IWYU from core
2014-03-22 23:08:09 -05:00
Jesse Beder
5fd25df859
Run IWYU
2014-03-22 22:46:04 -05:00
Jesse Beder
d98ab9f342
Merge ostream_wrapper fix from core
2014-03-22 19:27:54 -05:00
Jesse Beder
396a97050d
Fix SEGV in ostream_wrapper
2014-03-22 19:15:49 -05:00
Jesse Beder
9583d1ab07
Merge gtest from core
2014-03-22 19:09:22 -05:00
Jesse Beder
32125697f2
Rename regex.h and regex.cpp to regex_yaml, so they don't interfere with the posix variant
2014-03-22 19:03:49 -05:00
Jesse Beder
d63ec48c8a
Run clang-format
2014-03-22 13:05:03 -05:00
Jesse Beder
3355bbb399
Merge clang-format from core
2014-03-22 13:03:18 -05:00
Jesse Beder
9b4db068bb
Run clang-format
2014-03-22 12:49:16 -05:00
Jesse Beder
0305ad13e4
Fixed crash when emitting empty node
2013-07-10 08:29:11 -05:00
Jesse Beder
e5aa599b27
Merge null string bug fix from core, plus bug fix regarding use-after-delete for a token that seems to have been ignored.
2013-04-13 18:25:37 -05:00
Jesse Beder
2375f2c66b
Fix bug where the string "null" (without quotes) is deserialized as a string, instead of null.
2013-04-13 18:21:06 -05:00
Jesse Beder
ae42def6cf
Merge to fix default precision for floats.
2013-04-13 00:09:40 -05:00
Jesse Beder
e0ae477b8f
Switch default precision to one more than the number of digits allows.
...
See, e.g., http://stackoverflow.com/questions/4738768/printing-double-without-losing-precision .
2013-04-13 00:00:58 -05:00
Jesse Beder
6276189716
Merged ? fix from core
2012-11-08 19:12:22 -06:00
Jesse Beder
8c517bf0fd
Fixed parsing ? when attached to a scalar
2012-11-08 19:11:41 -06:00
Jesse Beder
5721ac6194
Pulled 'null' renaming fix
2012-11-08 18:39:06 -06:00
Jesse Beder
0c72825303
Renamed all variables named 'null' (for real now, and only that)
2012-11-08 18:38:20 -06:00
Jesse Beder
16f05e73b9
Reverted last change
2012-11-08 18:24:00 -06:00
Jesse Beder
06e09d1d64
Renamed all variables named 'null'
2012-11-08 18:21:00 -06:00
Jesse Beder
0c772c4c3f
Set LoadFile and LoadAllFromFile to throw an exception if we can't load the file
2012-11-08 18:14:26 -06:00
Jesse Beder
823311384f
Added free Clone() function for Nodes
2012-07-04 15:26:37 -05:00
Jesse Beder
f29ea4b070
Merged end of map/seq flow fix from core
2012-06-09 14:42:00 -05:00
Jesse Beder
68dd9b5d18
Fixed bug where the parser doesn't find the end of a map or seq flow
2012-06-09 14:39:00 -05:00
Jesse Beder
ab36ca930f
Updated from core (emitter)
2012-05-25 19:39:15 -05:00
Jesse Beder
d5130a4109
Changed Emitter::size() to return std::size_t instead of unsigned
2012-05-25 19:38:58 -05:00
Jesse Beder
6c690e8294
Updated the ostream emitting overload to user the new ostream-handling emitters
2012-05-25 19:38:20 -05:00
Jesse Beder
a78069a6e2
Merged ostreams for the emitter change from the core
2012-05-25 19:35:24 -05:00
Jesse Beder
bc3f72b565
Switched the stream << for c-strings to take a templated array param (since we never stream user-built c-strings, only string literals). For this, refactored the escape character display
2012-05-25 19:33:34 -05:00
Jesse Beder
772969270d
Refactored stream overloads
2012-05-25 18:24:07 -05:00
Jesse Beder
2ffdc5b4d1
Added constructor to the Emitter with a stream, so you can write directly to a stream instead of our temp
2012-05-25 18:22:33 -05:00
Jesse Beder
e6d4a915dc
Switched the ostream wrapper to wrap a std::vector<char> instead of our manually managed memory
2012-05-25 18:17:14 -05:00
Jesse Beder
7c85e9d5de
Updated ostream wrapper with a write() and update_pos
2012-05-25 17:39:14 -05:00
Jesse Beder
1602f78974
Renamed ostream -> ostream_wrapper
2012-05-25 17:28:35 -05:00
Jesse Beder
4116d89f2c
Merged emitter refactor from core
2012-05-23 15:30:03 -05:00
Jesse Beder
52813050d2
Fixed map/comment/seq emitting
2012-05-23 11:18:53 -05:00
Jesse Beder
52d01ff154
Fixed top-level comment emitting
2012-05-23 11:02:17 -05:00
Jesse Beder
7d7075fdf9
Set indentation to be at least 2
2012-05-22 18:01:48 -05:00
Jesse Beder
abd49d8bca
Added null
2012-05-22 17:55:17 -05:00
Jesse Beder
8b3778a639
Fixed warnings
2012-05-22 17:50:40 -05:00
Jesse Beder
0abbf650b5
Fixed char output
2012-05-22 17:50:10 -05:00
Jesse Beder
c664d50d5c
Fixed double quote escapes (e.g., \n is now that instead of \x0a)
2012-05-22 17:45:31 -05:00
Jesse Beder
4123583159
Fixed end seq/map error msg
2012-05-22 16:56:10 -05:00
Jesse Beder
2c2b788391
Fixed doc start/end
2012-05-22 16:53:40 -05:00
Jesse Beder
611d243b84
Fixed global setting indentation
2012-05-22 16:47:08 -05:00
Jesse Beder
f4278fe39f
Added long key flow map
2012-05-22 16:41:03 -05:00