Creates all well-formed sequences of bytes up to length 4. Furthermore,
creates ill-formed sequences by removing required trailing bytes or
changing bytes. As the tests can take a lot of time, preprocessor
symbols are introduced.
These classes are now constructed with an interface adapter. This moves
complexity from various places into the interface adapter class, or to
some factories which now implement the different flavors of input.
Furthermore, input adapters are kept in std::shared_ptr to avoid the
need of manual deletion.
We totally forgot to implement the comparison operators other than ==
and != for scalar types. Consequently, comparing a JSON value with a
scalar type led to compile errors.
- removed uncached input stream adapter; it was too slow anyway
- implemented a class binary_read which parses CBOR based on input
adapters
- in the CBOR parser, numbers are created via memcpy to avoid undefined
behavior
To have nothrow-copy-constructible exceptions, we inherit from
std::runtime_error which can cope with arbitrary-length error messages.
Intermediate strings are built with static functions and then passed to
the actual constructor.
This commit removed the re2c lexer and replaced it by a manual version.
Its integration is not yet complete: number parsing does not respect
locales or overflows. Furthermore, parsing does not need to end with
EOF. Therefore, a lot of test cases fail. The idea is to push this
branch forward so we can conduct performance comparisons. So far, a
nice side effect are better diagnosis messages in case of parse errors.
We should compare the binary serializations rather than the JSON values
themselves. This fix was already done for CBOR and apparently forgotten
for MessagePack.
- Removed unused headers.
- Added override where needed.
- Added description for parse_error.113 exception.
- Fixed some conversion warnings.
- Integrated cbor_expect_string function for CBOR maps.
- Added documentation on the supported CBOR/MessagePack features.
- Added test to check all initial bytes for CBOR input.
Since #329, NaN and inf numbers do not yield an exception, but are
stored internally and are dumped as “null”. This commit adjusts the
fuzz testers to deal with this special case.