Remove old 4-stage path.

This commit is contained in:
Geoff Langdale
2018-09-26 15:22:55 +10:00
parent b9706d462c
commit 9f91650e72
9 changed files with 6 additions and 1080 deletions
-21
View File
@@ -44,27 +44,6 @@ void deallocate_ParsedJson(ParsedJson *pj_ptr) {
delete pj_ptr;
}
// parse a document found in buf, need to preallocate ParsedJson.
// this can probably be considered a legacy function at this point.
bool json_parse_4stages(const u8 *buf, size_t len, ParsedJson &pj) {
if (pj.bytecapacity < len) {
std::cerr << "Your ParsedJson cannot support documents that big: " << len
<< std::endl;
return false;
}
bool isok = find_structural_bits(buf, len, pj);
if (isok) {
isok = flatten_indexes(len, pj);
}
if (isok) {
isok = ape_machine(buf, len, pj);
}
if (isok) {
isok = shovel_machine(buf, len, pj);
}
return isok;
}
// parse a document found in buf, need to preallocate ParsedJson.
bool json_parse(const u8 *buf, size_t len, ParsedJson &pj) {
if (pj.bytecapacity < len) {