1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-21 04:22:05 +03:00

🚧 manual lexer

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.
This commit is contained in:
Niels Lohmann
2017-03-24 19:49:02 +01:00
parent 54db53c230
commit 40160f482a
9 changed files with 851 additions and 14699 deletions

View File

@ -36,10 +36,11 @@ using nlohmann::json;
TEST_CASE("Unicode", "[hide]")
{
/* NOTE: to_unicode is not used any more
SECTION("full enumeration of Unicode code points")
{
// lexer to call to_unicode on
json::lexer dummy_lexer(reinterpret_cast<const json::lexer::lexer_char_t*>(""), 0);
json::lexer dummy_lexer("", 0);
// create an escaped string from a code point
const auto codepoint_to_unicode = [](std::size_t cp)
@ -118,6 +119,7 @@ TEST_CASE("Unicode", "[hide]")
CHECK(j3 == j4);
}
}
*/
SECTION("read all unicode characters")
{