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
Jesse Beder
676e0b94ac
Fixed flow seq/map indentation
2012-05-22 16:39:03 -05:00
Jesse Beder
0e3e6791ff
Added flow map, simple key/value
2012-05-22 16:36:07 -05:00
Jesse Beder
b8a87c43bc
Added flow seq
2012-05-22 15:42:45 -05:00
Jesse Beder
2670ce8aaf
Fixed bool formatting
2012-05-22 15:08:21 -05:00
Jesse Beder
faa2e50605
Forced literal scalars to use long keys
2012-05-22 15:07:11 -05:00
Jesse Beder
944ebb7d1e
Fixed settings reverting properly
2012-05-22 15:00:10 -05:00
Jesse Beder
bf07af52ff
Added long key
2012-05-22 14:26:34 -05:00
Jesse Beder
41e4cd3308
Split block map simple/long key for both key/value
2012-05-22 14:20:50 -05:00
Jesse Beder
c95bcae49f
Added writing integral types
2012-05-22 13:57:44 -05:00
Jesse Beder
cc559956a0
Added bool, char, binary
2012-05-22 13:53:03 -05:00
Jesse Beder
5e0886db87
Fixed block map prepare value (where the colon goes)
2012-05-22 12:59:07 -05:00
Jesse Beder
a626424baa
Split the block map prepare into key/value
2012-05-22 12:56:40 -05:00
Jesse Beder
80823583a0
Tweaked spacing for comments
2012-05-22 12:54:54 -05:00
Jesse Beder
eef692d7b2
Fixed when we emit the doc start (only if there already is a document in the stream, and we're about to emit a new node)
2012-05-22 12:37:00 -05:00
Jesse Beder
0814813302
Added comments, not entirely correct
2012-05-22 12:29:36 -05:00
Jesse Beder
0f3f1e26a7
Fixed map/value
2012-05-21 23:47:57 -05:00
Jesse Beder
f72e325c40
Renamed begin/end scalar/group to started/ended scalar/group
2012-05-21 23:39:45 -05:00
Jesse Beder
07e88a78cb
Added alias
2012-05-21 23:37:49 -05:00
Jesse Beder
c5e4bdee94
Fixed newline
2012-05-21 23:34:42 -05:00
Jesse Beder
d3801b7482
Added newlines, fixed map/map
2012-05-21 23:29:59 -05:00
Jesse Beder
b0dd0f862a
Fixed anchor/tag in seq > map
2012-05-21 23:23:53 -05:00
Jesse Beder
3cae26a75e
Added tags and anchors
2012-05-21 23:19:29 -05:00
Jesse Beder
91eac5d93d
Implemented block seq and block map indentation/newlines
2012-05-21 22:14:26 -05:00
Jesse Beder
35d827f187
Structured emitter node handling better
2012-05-21 21:57:25 -05:00
Jesse Beder
23fb2dc811
Fixed basic block seq indentation
2012-05-21 21:11:03 -05:00
Jesse Beder
b5d8241dfa
Added block seq indentation
2012-05-21 21:04:10 -05:00
Jesse Beder
d86cfc1c63
Implemented the Write for scalars (including checking which type of scalar it should be)
2012-05-21 19:07:56 -05:00
Jesse Beder
65d80ebc11
Started prepare node
2012-05-21 17:06:12 -05:00
Jesse Beder
923ccc8fed
Implemented begin/end doc
2012-05-21 16:54:45 -05:00
Jesse Beder
5a2183f55b
Removed old emitter state machine
2012-05-21 16:31:07 -05:00
Jesse Beder
41c2ddc03e
Switched the emitter state enums to scoped enums
2012-05-21 15:05:17 -05:00
Jesse Beder
f17cfacdbb
Updated from core
2012-05-19 22:39:36 -05:00
Jesse Beder
030f48583a
Fixed tag for implicit map
2012-05-19 22:38:12 -05:00
Jesse Beder
c22512649e
Copied all files from new-api branch of old repo
2012-05-19 15:34:02 -05:00
Jesse Beder
683c60f490
Removed traces of old-api Node
2012-05-19 01:19:03 -05:00
Jesse Beder
a183293ff0
Removed old-api tests, added (empty) core spec tests
2012-05-19 01:16:54 -05:00
Jesse Beder
0d32d19ed8
First pass at spearating out a 'core' library from the old api (default) branch
2012-05-19 01:04:43 -05:00
Jesse Beder
fca7b7e190
Fixed reading bad memory error
2012-05-14 23:09:25 -05:00
Jesse Beder
4ca9269e24
Patched signed -> unsigned warning (issue 98)
2012-02-14 10:11:44 -06:00
Jesse Beder
01eb370300
Added operator >> overload for Binary
2012-01-21 02:01:37 -06:00
Jesse Beder
d760d037ca
Renamed the base64 methods, and switched the EncodeBase64 one to return a string (to make it easy to use elsewhere)
2012-01-21 01:33:49 -06:00
Jesse Beder
6105d4cfeb
Refactored the base64 binary to its own space with a unified class that (will) be used for parsing (in addition to emitting)
2012-01-21 01:18:37 -06:00
Jesse Beder
b688c93050
Put all the old-api stuff back in the main folder, for simplicity
2012-01-20 23:55:39 -06:00
Jesse Beder
1723523c43
Removed the new API from the default branch
2012-01-20 23:50:39 -06:00
Jesse Beder
d772361f15
Fixed hex and oct emitting (it now adds the 0x or 0 prefix)
2012-01-13 00:00:11 -06:00
Jesse Beder
ddc578dbd7
Added LoadFile and LoadAllFromFile (new API)
2012-01-11 21:31:01 -06:00
Jesse Beder
8906ae9a0d
Fixed bug in parsing escaped newline (it was being clipped like a regular newline)
2012-01-11 17:55:27 -06:00
Jesse Beder
7ace0e93d2
Fixed signed/unsigned mismatch with the new precision code
2012-01-11 16:50:06 -06:00
Jesse Beder
97fa02a484
Disallowed a plain scalar with just a dash
2012-01-11 16:39:24 -06:00
Jesse Beder
5024caa69c
Added float/double precision setters
2012-01-11 14:34:04 -06:00
Jesse Beder
5b32d89222
Fixed compiler error in iterator_base friend forward declaration in node on clang (and I hope MSVC), plus warnings on clang
2012-01-07 01:42:21 -06:00
Jesse Beder
3099d51ba4
Added single character emitting
2011-11-14 16:23:14 -06:00
Jesse Beder
62634f53ec
Fixed emitter bug with colon at the end of a scalar in a flow collection
2011-10-31 19:16:17 -05:00
Jesse Beder
860365b263
Switched the utf bom checking to putback in the stream (instead of keeping a secondary buffer), which fixes a bug when there's only one ascii character
2011-10-20 22:29:41 -05:00
Jesse Beder
c953ce0b07
Fixed broken includes when using the old api
2011-10-18 15:13:10 -05:00
Jesse Beder
70e1eb3f9c
Fixed the #ifdefs for the api stuff
2011-10-18 14:47:35 -05:00
Jesse Beder
f3b230693a
Moved conversion.cpp to the old api, where it belongs
2011-09-14 01:49:06 -05:00
Jesse Beder
f64f619c29
Added bool conversions
2011-09-14 01:48:36 -05:00
Jesse Beder
e5d0366797
Added Dump()
2011-09-13 14:49:00 -05:00
Jesse Beder
c3798d9bd4
Added tags to Node emitter output
2011-09-13 14:47:33 -05:00
Jesse Beder
e3d5ec189d
Switched YAML::Parse to YAML::Load, and added LoadAll
2011-09-13 14:24:47 -05:00
Jesse Beder
69af9b420a
Copied 2.x tests with tags
2011-09-13 14:07:22 -05:00
Jesse Beder
0987b234c3
Added tags to Node
2011-09-13 14:00:47 -05:00
Jesse Beder
fddc991b60
Fixed NodeBuilder bug when an alias was in a map - we weren't pushing that guy as a key
2011-09-12 14:24:27 -05:00
Jesse Beder
3337df7ca2
Fixed new API node key/value insertion in NodeBuilder (it was using the wrong condition on when it had added a key already)
2011-09-12 13:25:41 -05:00
Jesse Beder
4568dd0b19
Started specialization for operator[] for integers
2011-09-11 21:32:47 -05:00
Jesse Beder
a308b73e8a
Set the map iterator to filter over undefined items
2011-09-11 19:44:27 -05:00
Jesse Beder
a03af5dd73
Implemented the map size computation
2011-09-11 17:16:26 -05:00
Jesse Beder
b50264e74d
Switched the implementation of maps from list<pair> to map (but just pointer comparison)
2011-09-11 16:56:38 -05:00
Jesse Beder
ecdd9cc66d
Added computing and caching the sequence size
2011-09-11 16:21:36 -05:00
Jesse Beder
2d81e46655
Added dependency management (to cause nodes to become defined if their children do)
2011-09-11 15:59:53 -05:00
Jesse Beder
b4963ab0fa
Added a few simple node tests, and the sequence one doesn't pass (let's work now)
2011-09-10 23:31:12 -05:00
Jesse Beder
2d06df474b
Fixed up the old API stuff, and removed the util/value (since it's no longer needed)
2011-09-10 23:11:28 -05:00
Jesse Beder
80cf3c98db
Fixed minor things that used the old API, compiles/links/runs\!
2011-09-10 22:59:27 -05:00
Jesse Beder
0d1b5224c8
Major switch from Value -> Node. The library compiles with the new API, but tests are still oldies, and don't compile
2011-09-10 17:57:23 -05:00
Jesse Beder
ac81d7c883
Start of moving Value -> Node and Node -> old API Node (with a #define toggle)
2011-09-10 17:18:15 -05:00
Jesse Beder
78b7a1b8a9
Added helper emitter functions, but we have a problem: YAML::Value is already a manipulator
2011-09-10 16:50:44 -05:00
Jesse Beder
12364895cb
Implemented value events emitter
2011-09-10 16:23:18 -05:00
Jesse Beder
5012063143
Fixed node iterator
2011-09-10 14:36:10 -05:00
Jesse Beder
4fdbb748ec
Updated the node/value classes with the new iterators, they compile until we try to instantiate anything
2011-09-10 14:11:42 -05:00
Jesse Beder
f5a9d4c8e3
Started emitting events for Values
2011-09-10 12:42:42 -05:00
Jesse Beder
09beb5c47a
Implemented sugar Parse() functions
2011-09-09 23:40:19 -05:00
Jesse Beder
6e03bebeb0
Implemented (untested) the value builder
2011-09-09 23:28:21 -05:00
Jesse Beder
ff1a8fc59a
Started writing new iterators
2011-09-09 16:17:59 -05:00
Jesse Beder
7bbf712c36
Made the 'data' member optional in node_ref - it's only created on-demand, so we don't waste extra memory every time we do Value tmp = v;
2011-09-09 14:26:55 -05:00
Jesse Beder
d3bbd08273
Added append()
2011-09-09 02:51:35 -05:00
Jesse Beder
4f8680b540
Switched operator[] access to node reference equality, not node equality
2011-09-09 02:39:36 -05:00
Jesse Beder
ec95e61c04
Switched memory to using shared nodes, and node_data to keep only naked node pointers, not shared nodes (to break the cycle, and we don't need weak pointers because their memory is guaranteed to exist, via 'memory')
2011-09-09 02:29:17 -05:00
Jesse Beder
6ffc9ac788
Added half of the std::map conversion (we don't have reading from Values yet)
2011-09-08 02:10:04 -05:00
Jesse Beder
0e197b8723
Added back the streamable conversions
2011-09-08 02:05:03 -05:00
Jesse Beder
3d84f57008
Switched convert to a templated struct that can be specialized (so we can partially specialize it)
2011-09-08 02:02:15 -05:00
Jesse Beder
a7ebb3615a
Added streamable conversions
2011-09-08 00:48:40 -05:00
Jesse Beder
a95baeafd6
Implemented conversion for std::string, including a bypass-accessor to the scalar value
2011-09-07 15:49:01 -05:00
Jesse Beder
1ab16bac62
Set the 'memory' to only store node_refs, not nodes
2011-09-07 14:56:04 -05:00
Jesse Beder
020cd97915
Set up map searching by templated key
2011-09-07 03:21:24 -05:00
Jesse Beder
f0174ca08b
Reorganized so that we don't have cyclic include problems
2011-09-07 02:59:58 -05:00
Jesse Beder
fed95c5da4
Implemented map access by already-existing node
2011-09-07 02:39:59 -05:00
Jesse Beder
a530630f1c
Started implementing node_data
2011-09-07 00:45:28 -05:00
Jesse Beder
dd1eb715c4
Switched YAML::Binary interface to use unsigned chars, not chars
2011-09-06 00:39:31 -05:00
Jesse Beder
7e129c9b64
Fixed empty string emitter bug (it now with auto-quote it
2011-09-06 00:24:10 -05:00
Jesse Beder
3e94c0a037
Switched the 'pragma once' to only happen on MSVC, or gcc >= 3.4 (it was causing trouble on the sun compiler)
2011-09-06 00:16:03 -05:00
Jesse Beder
bacb74e8ec
Forced a newline after any comments
2011-08-04 21:47:57 +00:00
Jesse Beder
b1ac3289b8
Included <cstddef> for NULL
2011-08-04 18:47:37 +00:00
Jesse Beder
9fbcfe9ec5
Added include <cstdlib> for using 'NULL' (apparently gcc 4.6 is more strict)
2011-05-03 21:55:49 +00:00
Jesse Beder
c67b41c966
Marked Parser, Emitter, Node, Iterator, Mark, and Null for exporting to a DLL. It appears to work properly, although VS gives me lots of warning C4251 since I didn't export all data members of each of the above classes.
...
It seems that it's not necessary to export those members (as long as you can't access them), and most of them are STL instances, which apparently cause lots of problems for DLLs. (For example, you simply can't export instances of std::map; see http://support.microsoft.com/kb/168958 .)
2011-03-16 02:31:30 +00:00
Jesse Beder
6152fb345e
Added newline at the end
2011-03-10 00:23:15 +00:00
Jesse Beder
bb463d8d8b
Fixed folding bug (detecting indentation, example 8.2), and clipping/stripping empty strings (example 8.6)
2011-03-04 02:26:59 +00:00
Jesse Beder
cb632b3968
Added explicit doc start/end tokens for the emitter, and set it so that if you try to write after you've already written a full doc, it writes a doc start and continues
2011-03-03 09:26:12 +00:00
Jesse Beder
b9d4ccd254
Removed the default --- at the start of all emitter output
2011-03-03 08:57:00 +00:00
Jesse Beder
d6aeb16450
Switched the scanner list of owned indent markers to a ptr_vector
2011-03-03 08:34:30 +00:00
Jesse Beder
a518d87cfc
Switched the emitter state's stack of groups to a ptr_stack
2011-03-03 08:11:14 +00:00
Jesse Beder
1f9cc2d327
Compressed the sequence-of-maps emitting (got rid of the unnecessary newline) - issue 61
2011-03-03 03:37:54 +00:00
Jesse Beder
ca5992b971
Merged r444:449 from the node refactoring branch to the trunk
2011-03-03 00:19:26 +00:00
Jesse Beder
7998db8397
Prettied up the bool formatting code
2011-03-02 20:59:39 +00:00
Jesse Beder
39c396ab01
Refactored bool emitting to make it 1) correct for the short bool form and 2) not barf on early versions of VS
2011-03-02 20:55:05 +00:00
Jesse Beder
f34d60ca65
Flipped the include guard and the pragma, and don't use the pragma for early versions of gcc (< 3.4)
2011-03-02 06:11:41 +00:00
Jesse Beder
4caedfda74
Small changes to eliminate compiler warnings for 'nite' in issue 83
2011-03-02 05:29:46 +00:00
Jesse Beder
2faeb76e2d
Moved the local structs from Emitter::Write(bool) to an anonymous namespace in the hopes that Visual Studio <= 2003 will be happy
2011-03-02 05:21:25 +00:00
Jesse Beder
802cc6bcd6
Merged contrib folders from the graphbuilder-api branch, including the recursive search in CMakeLists.txt
2011-03-02 04:48:04 +00:00
Jesse Beder
c65a7dfc7c
Switched exception constants to const char * const (from const std::string) so we don't have to construct them all in every translation unit, and switched the exception class to derive from std::runtime_error (so it handles what() for us)
2011-03-02 04:12:57 +00:00
Jesse Beder
d1cb1aa74f
Included cstddef to stream.h
2011-02-05 22:28:08 +00:00
Jesse Beder
be1b14f369
Added Anchor() regex (so that we're not just using Alphanumeric to match anchors), but it's still not 100% right (it shouldn't allow non-printable characters, e.g.). Also fixed a test that was broken along these lines (if a colon immediately follows an anchor, it's part of the anchor)
2011-01-31 17:47:20 +00:00
Jesse Beder
337cb553d0
Fixed emitting colon at end of scalar bug
2010-12-03 21:52:04 +00:00
Jesse Beder
a6afaabcb0
Refactored tags so we can emit secondary tags (and named local tags)
2010-10-28 23:06:16 +00:00
Jesse Beder
d508203ed8
Implemented binary emitting without the binary tag
2010-10-28 21:53:54 +00:00
Jesse Beder
f1697dea15
Refactored emitter so that it emits the : for an implicit key right away
2010-10-22 04:19:01 +00:00
Jesse Beder
6b7cb45ac8
Added more tests for the newline, and disallowed newlines after implicit block keys
2010-10-22 03:53:33 +00:00
Jesse Beder
1e4210401f
Added YAML::Newline manipulator for the emitter
2010-10-21 22:02:29 +00:00
Jesse Beder
51c84f1c02
Merged the other-tags branch into the trunk (this wasn't an rX:Y merge, since the branch wasn't branched directly from the head of the trunk)
2010-10-19 06:46:55 +00:00
Jesse Beder
5b8ca9ce01
Moved all the includes to a subfolder yaml-cpp so they don't interfere with other libraries' includes
2010-10-18 07:05:53 +00:00
Jesse Beder
a71c03a18b
Merged r366:387 from the jbeder-event-api branch
2010-10-18 06:45:03 +00:00
Jesse Beder
0a02403fb0
Fixed missing header
2010-05-01 20:05:15 +00:00
Jesse Beder
3a755de572
Added missing include
2009-12-02 05:59:18 +00:00
Jesse Beder
8723b8f358
Fixed leak when adding duplicate keys (and actually changed the behavior - now we take the first instance, not the last)
2009-12-02 01:01:45 +00:00
Jesse Beder
03df73a7b0
Refactored emitter operator << overloads to not template them, so it's easier to overload for pointer types
2009-11-17 20:21:22 +00:00
Jesse Beder
54b68230ae
Small bug from switching static initialized regexes to lazy ones
2009-11-12 05:45:47 +00:00
Jesse Beder
6f94f954bb
Overloaded more integral types for emitting
2009-11-06 03:24:12 +00:00