From dc2a59f02c05275ba2129bbfab42e83041b6125e Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Thu, 26 Mar 2020 19:45:19 +0100 Subject: [PATCH] cleanup of old stuff --- Sconstruct.py | 8 - lib/jsmn/.clang-format | 90 ------ lib/jsmn/.travis.yml | 4 - lib/jsmn/LICENSE | 20 -- lib/jsmn/Makefile | 36 --- lib/jsmn/README.md | 182 ------------ lib/jsmn/example/jsondump.c | 134 --------- lib/jsmn/example/simple.c | 77 ------ lib/jsmn/jsmn.h | 471 -------------------------------- lib/jsmn/library.json | 16 -- lib/jsmn/test/test.h | 31 --- lib/jsmn/test/test_default | Bin 30288 -> 0 bytes lib/jsmn/test/test_links | Bin 30288 -> 0 bytes lib/jsmn/test/test_strict | Bin 30288 -> 0 bytes lib/jsmn/test/test_strict_links | Bin 30288 -> 0 bytes lib/jsmn/test/tests.c | 359 ------------------------ lib/jsmn/test/testutil.h | 96 ------- syntax/stes-c.json | 69 ----- 18 files changed, 1593 deletions(-) delete mode 100644 Sconstruct.py delete mode 100644 lib/jsmn/.clang-format delete mode 100644 lib/jsmn/.travis.yml delete mode 100644 lib/jsmn/LICENSE delete mode 100644 lib/jsmn/Makefile delete mode 100644 lib/jsmn/README.md delete mode 100644 lib/jsmn/example/jsondump.c delete mode 100644 lib/jsmn/example/simple.c delete mode 100644 lib/jsmn/jsmn.h delete mode 100644 lib/jsmn/library.json delete mode 100644 lib/jsmn/test/test.h delete mode 100755 lib/jsmn/test/test_default delete mode 100755 lib/jsmn/test/test_links delete mode 100755 lib/jsmn/test/test_strict delete mode 100755 lib/jsmn/test/test_strict_links delete mode 100644 lib/jsmn/test/tests.c delete mode 100644 lib/jsmn/test/testutil.h delete mode 100644 syntax/stes-c.json diff --git a/Sconstruct.py b/Sconstruct.py deleted file mode 100644 index f7c1881..0000000 --- a/Sconstruct.py +++ /dev/null @@ -1,8 +0,0 @@ -env = Environment() - -env.Append(CCFLAGS=['-O3', '-Wall', '-Wextra', '-pedantic', '-Werror', '-Warray-bounds']) - -env.Append(LIBPATH = ['lib/']) -env.Append(LIBS = ['ncursesw']) - -env.Program(target='ste', source=['src/ste.c']) diff --git a/lib/jsmn/.clang-format b/lib/jsmn/.clang-format deleted file mode 100644 index 3a5940e..0000000 --- a/lib/jsmn/.clang-format +++ /dev/null @@ -1,90 +0,0 @@ ---- -Language: Cpp -# BasedOnStyle: LLVM -AccessModifierOffset: -2 -AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false -AlignEscapedNewlinesLeft: false -AlignOperands: true -AlignTrailingComments: true -AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: All -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: false -BinPackArguments: true -BinPackParameters: true -BraceWrapping: - AfterClass: false - AfterControlStatement: false - AfterEnum: false - AfterFunction: false - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - BeforeCatch: false - BeforeElse: false - IndentBraces: false -BreakBeforeBinaryOperators: None -BreakBeforeBraces: Attach -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: false -ColumnLimit: 80 -CommentPragmas: '^ IWYU pragma:' -ConstructorInitializerAllOnOneLineOrOnePerLine: false -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true -DerivePointerAlignment: false -DisableFormat: false -ExperimentalAutoDetectBinPacking: false -ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] -IncludeCategories: - - Regex: '^"(llvm|llvm-c|clang|clang-c)/' - Priority: 2 - - Regex: '^(<|"(gtest|isl|json)/)' - Priority: 3 - - Regex: '.*' - Priority: 1 -IndentCaseLabels: false -IndentWidth: 2 -IndentWrappedFunctionNames: false -KeepEmptyLinesAtTheStartOfBlocks: true -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 1 -NamespaceIndentation: None -ObjCBlockIndentWidth: 2 -ObjCSpaceAfterProperty: false -ObjCSpaceBeforeProtocolList: true -PenaltyBreakBeforeFirstCallParameter: 19 -PenaltyBreakComment: 300 -PenaltyBreakFirstLessLess: 120 -PenaltyBreakString: 1000 -PenaltyExcessCharacter: 1000000 -PenaltyReturnTypeOnItsOwnLine: 60 -PointerAlignment: Right -ReflowComments: true -SortIncludes: true -SpaceAfterCStyleCast: false -SpaceBeforeAssignmentOperators: true -SpaceBeforeParens: ControlStatements -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 1 -SpacesInAngles: false -SpacesInContainerLiterals: true -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -Standard: Cpp11 -TabWidth: 8 -UseTab: Never -... - diff --git a/lib/jsmn/.travis.yml b/lib/jsmn/.travis.yml deleted file mode 100644 index 1c8ebd3..0000000 --- a/lib/jsmn/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: c -sudo: false -script: - - make test diff --git a/lib/jsmn/LICENSE b/lib/jsmn/LICENSE deleted file mode 100644 index c84fb2e..0000000 --- a/lib/jsmn/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2010 Serge A. Zaitsev - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/lib/jsmn/Makefile b/lib/jsmn/Makefile deleted file mode 100644 index dcbdd89..0000000 --- a/lib/jsmn/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# You can put your build options here --include config.mk - -test: test_default test_strict test_links test_strict_links -test_default: test/tests.c jsmn.h - $(CC) $(CFLAGS) $(LDFLAGS) $< -o test/$@ - ./test/$@ -test_strict: test/tests.c jsmn.h - $(CC) -DJSMN_STRICT=1 $(CFLAGS) $(LDFLAGS) $< -o test/$@ - ./test/$@ -test_links: test/tests.c jsmn.h - $(CC) -DJSMN_PARENT_LINKS=1 $(CFLAGS) $(LDFLAGS) $< -o test/$@ - ./test/$@ -test_strict_links: test/tests.c jsmn.h - $(CC) -DJSMN_STRICT=1 -DJSMN_PARENT_LINKS=1 $(CFLAGS) $(LDFLAGS) $< -o test/$@ - ./test/$@ - -simple_example: example/simple.c jsmn.h - $(CC) $(LDFLAGS) $< -o $@ - -jsondump: example/jsondump.c jsmn.h - $(CC) $(LDFLAGS) $< -o $@ - -fmt: - clang-format -i jsmn.h test/*.[ch] example/*.[ch] - -lint: - clang-tidy jsmn.h --checks='*' - -clean: - rm -f *.o example/*.o - rm -f simple_example - rm -f jsondump - -.PHONY: clean test - diff --git a/lib/jsmn/README.md b/lib/jsmn/README.md deleted file mode 100644 index 0f6ed27..0000000 --- a/lib/jsmn/README.md +++ /dev/null @@ -1,182 +0,0 @@ -JSMN -==== - -[![Build Status](https://travis-ci.org/zserge/jsmn.svg?branch=master)](https://travis-ci.org/zserge/jsmn) - -jsmn (pronounced like 'jasmine') is a minimalistic JSON parser in C. It can be -easily integrated into resource-limited or embedded projects. - -You can find more information about JSON format at [json.org][1] - -Library sources are available at https://github.com/zserge/jsmn - -The web page with some information about jsmn can be found at -[http://zserge.com/jsmn.html][2] - -Philosophy ----------- - -Most JSON parsers offer you a bunch of functions to load JSON data, parse it -and extract any value by its name. jsmn proves that checking the correctness of -every JSON packet or allocating temporary objects to store parsed JSON fields -often is an overkill. - -JSON format itself is extremely simple, so why should we complicate it? - -jsmn is designed to be **robust** (it should work fine even with erroneous -data), **fast** (it should parse data on the fly), **portable** (no superfluous -dependencies or non-standard C extensions). And of course, **simplicity** is a -key feature - simple code style, simple algorithm, simple integration into -other projects. - -Features --------- - -* compatible with C89 -* no dependencies (even libc!) -* highly portable (tested on x86/amd64, ARM, AVR) -* about 200 lines of code -* extremely small code footprint -* API contains only 2 functions -* no dynamic memory allocation -* incremental single-pass parsing -* library code is covered with unit-tests - -Design ------- - -The rudimentary jsmn object is a **token**. Let's consider a JSON string: - - '{ "name" : "Jack", "age" : 27 }' - -It holds the following tokens: - -* Object: `{ "name" : "Jack", "age" : 27}` (the whole object) -* Strings: `"name"`, `"Jack"`, `"age"` (keys and some values) -* Number: `27` - -In jsmn, tokens do not hold any data, but point to token boundaries in JSON -string instead. In the example above jsmn will create tokens like: Object -[0..31], String [3..7], String [12..16], String [20..23], Number [27..29]. - -Every jsmn token has a type, which indicates the type of corresponding JSON -token. jsmn supports the following token types: - -* Object - a container of key-value pairs, e.g.: - `{ "foo":"bar", "x":0.3 }` -* Array - a sequence of values, e.g.: - `[ 1, 2, 3 ]` -* String - a quoted sequence of chars, e.g.: `"foo"` -* Primitive - a number, a boolean (`true`, `false`) or `null` - -Besides start/end positions, jsmn tokens for complex types (like arrays -or objects) also contain a number of child items, so you can easily follow -object hierarchy. - -This approach provides enough information for parsing any JSON data and makes -it possible to use zero-copy techniques. - -Usage ------ - -Download `jsmn.h`, include it, done. - -``` -#include "jsmn.h" - -... -jsmn_parser p; -jsmntok_t t[128]; /* We expect no more than 128 JSON tokens */ - -jsmn_init(&p); -r = jsmn_parse(&p, s, strlen(s), t, 128); -``` - -Since jsmn is a single-header, header-only library, for more complex use cases -you might need to define additional macros. `#define JSMN_STATIC` hides all -jsmn API symbols by making them static. Also, if you want to include `jsmn.h` -from multiple C files, to avoid duplication of symbols you may define `JSMN_HEADER` macro. - -``` -/* In every .c file that uses jsmn include only declarations: */ -#define JSMN_HEADER -#include "jsmn.h" - -/* Additionally, create one jsmn.c file for jsmn implementation: */ -#include "jsmn.h" -``` - -API ---- - -Token types are described by `jsmntype_t`: - - typedef enum { - JSMN_UNDEFINED = 0, - JSMN_OBJECT = 1, - JSMN_ARRAY = 2, - JSMN_STRING = 3, - JSMN_PRIMITIVE = 4 - } jsmntype_t; - -**Note:** Unlike JSON data types, primitive tokens are not divided into -numbers, booleans and null, because one can easily tell the type using the -first character: - -* 't', 'f' - boolean -* 'n' - null -* '-', '0'..'9' - number - -Token is an object of `jsmntok_t` type: - - typedef struct { - jsmntype_t type; // Token type - int start; // Token start position - int end; // Token end position - int size; // Number of child (nested) tokens - } jsmntok_t; - -**Note:** string tokens point to the first character after -the opening quote and the previous symbol before final quote. This was made -to simplify string extraction from JSON data. - -All job is done by `jsmn_parser` object. You can initialize a new parser using: - - jsmn_parser parser; - jsmntok_t tokens[10]; - - jsmn_init(&parser); - - // js - pointer to JSON string - // tokens - an array of tokens available - // 10 - number of tokens available - jsmn_parse(&parser, js, strlen(js), tokens, 10); - -This will create a parser, and then it tries to parse up to 10 JSON tokens from -the `js` string. - -A non-negative return value of `jsmn_parse` is the number of tokens actually -used by the parser. -Passing NULL instead of the tokens array would not store parsing results, but -instead the function will return the value of tokens needed to parse the given -string. This can be useful if you don't know yet how many tokens to allocate. - -If something goes wrong, you will get an error. Error will be one of these: - -* `JSMN_ERROR_INVAL` - bad token, JSON string is corrupted -* `JSMN_ERROR_NOMEM` - not enough tokens, JSON string is too large -* `JSMN_ERROR_PART` - JSON string is too short, expecting more JSON data - -If you get `JSMN_ERROR_NOMEM`, you can re-allocate more tokens and call -`jsmn_parse` once more. If you read json data from the stream, you can -periodically call `jsmn_parse` and check if return value is `JSMN_ERROR_PART`. -You will get this error until you reach the end of JSON data. - -Other info ----------- - -This software is distributed under [MIT license](http://www.opensource.org/licenses/mit-license.php), - so feel free to integrate it in your commercial products. - -[1]: http://www.json.org/ -[2]: http://zserge.com/jsmn.html diff --git a/lib/jsmn/example/jsondump.c b/lib/jsmn/example/jsondump.c deleted file mode 100644 index 1eb6206..0000000 --- a/lib/jsmn/example/jsondump.c +++ /dev/null @@ -1,134 +0,0 @@ -#include "../jsmn.h" -#include -#include -#include -#include -#include - -/* Function realloc_it() is a wrapper function for standard realloc() - * with one difference - it frees old memory pointer in case of realloc - * failure. Thus, DO NOT use old data pointer in anyway after call to - * realloc_it(). If your code has some kind of fallback algorithm if - * memory can't be re-allocated - use standard realloc() instead. - */ -static inline void *realloc_it(void *ptrmem, size_t size) { - void *p = realloc(ptrmem, size); - if (!p) { - free(ptrmem); - fprintf(stderr, "realloc(): errno=%d\n", errno); - } - return p; -} - -/* - * An example of reading JSON from stdin and printing its content to stdout. - * The output looks like YAML, but I'm not sure if it's really compatible. - */ - -static int dump(const char *js, jsmntok_t *t, size_t count, int indent) { - int i, j, k; - jsmntok_t *key; - if (count == 0) { - return 0; - } - if (t->type == JSMN_PRIMITIVE) { - printf("%.*s", t->end - t->start, js + t->start); - return 1; - } else if (t->type == JSMN_STRING) { - printf("'%.*s'", t->end - t->start, js + t->start); - return 1; - } else if (t->type == JSMN_OBJECT) { - printf("\n"); - j = 0; - for (i = 0; i < t->size; i++) { - for (k = 0; k < indent; k++) { - printf(" "); - } - key = t + 1 + j; - j += dump(js, key, count - j, indent + 1); - if (key->size > 0) { - printf(": "); - j += dump(js, t + 1 + j, count - j, indent + 1); - } - printf("\n"); - } - return j + 1; - } else if (t->type == JSMN_ARRAY) { - j = 0; - printf("\n"); - for (i = 0; i < t->size; i++) { - for (k = 0; k < indent - 1; k++) { - printf(" "); - } - printf(" - "); - j += dump(js, t + 1 + j, count - j, indent + 1); - printf("\n"); - } - return j + 1; - } - return 0; -} - -int main() { - int r; - int eof_expected = 0; - char *js = NULL; - size_t jslen = 0; - char buf[BUFSIZ]; - - jsmn_parser p; - jsmntok_t *tok; - size_t tokcount = 2; - - /* Prepare parser */ - jsmn_init(&p); - - /* Allocate some tokens as a start */ - tok = malloc(sizeof(*tok) * tokcount); - if (tok == NULL) { - fprintf(stderr, "malloc(): errno=%d\n", errno); - return 3; - } - - for (;;) { - /* Read another chunk */ - r = fread(buf, 1, sizeof(buf), stdin); - if (r < 0) { - fprintf(stderr, "fread(): %d, errno=%d\n", r, errno); - return 1; - } - if (r == 0) { - if (eof_expected != 0) { - return 0; - } else { - fprintf(stderr, "fread(): unexpected EOF\n"); - return 2; - } - } - - js = realloc_it(js, jslen + r + 1); - if (js == NULL) { - return 3; - } - strncpy(js + jslen, buf, r); - jslen = jslen + r; - - again: - r = jsmn_parse(&p, js, jslen, tok, tokcount); - if (r < 0) { - if (r == JSMN_ERROR_NOMEM) { - tokcount = tokcount * 2; - tok = realloc_it(tok, sizeof(*tok) * tokcount); - if (tok == NULL) { - return 3; - } - goto again; - } - } else { - dump(js, tok, p.toknext, 0); - eof_expected = 1; - } - } - - return EXIT_SUCCESS; -} diff --git a/lib/jsmn/example/simple.c b/lib/jsmn/example/simple.c deleted file mode 100644 index 1254575..0000000 --- a/lib/jsmn/example/simple.c +++ /dev/null @@ -1,77 +0,0 @@ -#include "../jsmn.h" -#include -#include -#include - -/* - * A small example of jsmn parsing when JSON structure is known and number of - * tokens is predictable. - */ - -static const char *JSON_STRING = - "{\"user\": \"johndoe\", \"admin\": false, \"uid\": 1000,\n " - "\"groups\": [\"users\", \"wheel\", \"audio\", \"video\"]}"; - -static int jsoneq(const char *json, jsmntok_t *tok, const char *s) { - if (tok->type == JSMN_STRING && (int)strlen(s) == tok->end - tok->start && - strncmp(json + tok->start, s, tok->end - tok->start) == 0) { - return 0; - } - return -1; -} - -int main() { - int i; - int r; - jsmn_parser p; - jsmntok_t t[128]; /* We expect no more than 128 tokens */ - - jsmn_init(&p); - r = jsmn_parse(&p, JSON_STRING, strlen(JSON_STRING), t, - sizeof(t) / sizeof(t[0])); - if (r < 0) { - printf("Failed to parse JSON: %d\n", r); - return 1; - } - - /* Assume the top-level element is an object */ - if (r < 1 || t[0].type != JSMN_OBJECT) { - printf("Object expected\n"); - return 1; - } - - /* Loop over all keys of the root object */ - for (i = 1; i < r; i++) { - if (jsoneq(JSON_STRING, &t[i], "user") == 0) { - /* We may use strndup() to fetch string value */ - printf("- User: %.*s\n", t[i + 1].end - t[i + 1].start, - JSON_STRING + t[i + 1].start); - i++; - } else if (jsoneq(JSON_STRING, &t[i], "admin") == 0) { - /* We may additionally check if the value is either "true" or "false" */ - printf("- Admin: %.*s\n", t[i + 1].end - t[i + 1].start, - JSON_STRING + t[i + 1].start); - i++; - } else if (jsoneq(JSON_STRING, &t[i], "uid") == 0) { - /* We may want to do strtol() here to get numeric value */ - printf("- UID: %.*s\n", t[i + 1].end - t[i + 1].start, - JSON_STRING + t[i + 1].start); - i++; - } else if (jsoneq(JSON_STRING, &t[i], "groups") == 0) { - int j; - printf("- Groups:\n"); - if (t[i + 1].type != JSMN_ARRAY) { - continue; /* We expect groups to be an array of strings */ - } - for (j = 0; j < t[i + 1].size; j++) { - jsmntok_t *g = &t[i + j + 2]; - printf(" * %.*s\n", g->end - g->start, JSON_STRING + g->start); - } - i += t[i + 1].size + 1; - } else { - printf("Unexpected key: %.*s\n", t[i].end - t[i].start, - JSON_STRING + t[i].start); - } - } - return EXIT_SUCCESS; -} diff --git a/lib/jsmn/jsmn.h b/lib/jsmn/jsmn.h deleted file mode 100644 index cb27ca1..0000000 --- a/lib/jsmn/jsmn.h +++ /dev/null @@ -1,471 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2010 Serge Zaitsev - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef JSMN_H -#define JSMN_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef JSMN_STATIC -#define JSMN_API static -#else -#define JSMN_API extern -#endif - -/** - * JSON type identifier. Basic types are: - * o Object - * o Array - * o String - * o Other primitive: number, boolean (true/false) or null - */ -typedef enum { - JSMN_UNDEFINED = 0, - JSMN_OBJECT = 1, - JSMN_ARRAY = 2, - JSMN_STRING = 3, - JSMN_PRIMITIVE = 4 -} jsmntype_t; - -enum jsmnerr { - /* Not enough tokens were provided */ - JSMN_ERROR_NOMEM = -1, - /* Invalid character inside JSON string */ - JSMN_ERROR_INVAL = -2, - /* The string is not a full JSON packet, more bytes expected */ - JSMN_ERROR_PART = -3 -}; - -/** - * JSON token description. - * type type (object, array, string etc.) - * start start position in JSON data string - * end end position in JSON data string - */ -typedef struct { - jsmntype_t type; - int start; - int end; - int size; -#ifdef JSMN_PARENT_LINKS - int parent; -#endif -} jsmntok_t; - -/** - * JSON parser. Contains an array of token blocks available. Also stores - * the string being parsed now and current position in that string. - */ -typedef struct { - unsigned int pos; /* offset in the JSON string */ - unsigned int toknext; /* next token to allocate */ - int toksuper; /* superior token node, e.g. parent object or array */ -} jsmn_parser; - -/** - * Create JSON parser over an array of tokens - */ -JSMN_API void jsmn_init(jsmn_parser *parser); - -/** - * Run JSON parser. It parses a JSON data string into and array of tokens, each - * describing - * a single JSON object. - */ -JSMN_API int jsmn_parse(jsmn_parser *parser, const char *js, const size_t len, - jsmntok_t *tokens, const unsigned int num_tokens); - -#ifndef JSMN_HEADER -/** - * Allocates a fresh unused token from the token pool. - */ -static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser, jsmntok_t *tokens, - const size_t num_tokens) { - jsmntok_t *tok; - if (parser->toknext >= num_tokens) { - return NULL; - } - tok = &tokens[parser->toknext++]; - tok->start = tok->end = -1; - tok->size = 0; -#ifdef JSMN_PARENT_LINKS - tok->parent = -1; -#endif - return tok; -} - -/** - * Fills token type and boundaries. - */ -static void jsmn_fill_token(jsmntok_t *token, const jsmntype_t type, - const int start, const int end) { - token->type = type; - token->start = start; - token->end = end; - token->size = 0; -} - -/** - * Fills next available token with JSON primitive. - */ -static int jsmn_parse_primitive(jsmn_parser *parser, const char *js, - const size_t len, jsmntok_t *tokens, - const size_t num_tokens) { - jsmntok_t *token; - int start; - - start = parser->pos; - - for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { - switch (js[parser->pos]) { -#ifndef JSMN_STRICT - /* In strict mode primitive must be followed by "," or "}" or "]" */ - case ':': -#endif - case '\t': - case '\r': - case '\n': - case ' ': - case ',': - case ']': - case '}': - goto found; - default: - /* to quiet a warning from gcc*/ - break; - } - if (js[parser->pos] < 32 || js[parser->pos] >= 127) { - parser->pos = start; - return JSMN_ERROR_INVAL; - } - } -#ifdef JSMN_STRICT - /* In strict mode primitive must be followed by a comma/object/array */ - parser->pos = start; - return JSMN_ERROR_PART; -#endif - -found: - if (tokens == NULL) { - parser->pos--; - return 0; - } - token = jsmn_alloc_token(parser, tokens, num_tokens); - if (token == NULL) { - parser->pos = start; - return JSMN_ERROR_NOMEM; - } - jsmn_fill_token(token, JSMN_PRIMITIVE, start, parser->pos); -#ifdef JSMN_PARENT_LINKS - token->parent = parser->toksuper; -#endif - parser->pos--; - return 0; -} - -/** - * Fills next token with JSON string. - */ -static int jsmn_parse_string(jsmn_parser *parser, const char *js, - const size_t len, jsmntok_t *tokens, - const size_t num_tokens) { - jsmntok_t *token; - - int start = parser->pos; - - parser->pos++; - - /* Skip starting quote */ - for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { - char c = js[parser->pos]; - - /* Quote: end of string */ - if (c == '\"') { - if (tokens == NULL) { - return 0; - } - token = jsmn_alloc_token(parser, tokens, num_tokens); - if (token == NULL) { - parser->pos = start; - return JSMN_ERROR_NOMEM; - } - jsmn_fill_token(token, JSMN_STRING, start + 1, parser->pos); -#ifdef JSMN_PARENT_LINKS - token->parent = parser->toksuper; -#endif - return 0; - } - - /* Backslash: Quoted symbol expected */ - if (c == '\\' && parser->pos + 1 < len) { - int i; - parser->pos++; - switch (js[parser->pos]) { - /* Allowed escaped symbols */ - case '\"': - case '/': - case '\\': - case 'b': - case 'f': - case 'r': - case 'n': - case 't': - break; - /* Allows escaped symbol \uXXXX */ - case 'u': - parser->pos++; - for (i = 0; i < 4 && parser->pos < len && js[parser->pos] != '\0'; - i++) { - /* If it isn't a hex character we have an error */ - if (!((js[parser->pos] >= 48 && js[parser->pos] <= 57) || /* 0-9 */ - (js[parser->pos] >= 65 && js[parser->pos] <= 70) || /* A-F */ - (js[parser->pos] >= 97 && js[parser->pos] <= 102))) { /* a-f */ - parser->pos = start; - return JSMN_ERROR_INVAL; - } - parser->pos++; - } - parser->pos--; - break; - /* Unexpected symbol */ - default: - parser->pos = start; - return JSMN_ERROR_INVAL; - } - } - } - parser->pos = start; - return JSMN_ERROR_PART; -} - -/** - * Parse JSON string and fill tokens. - */ -JSMN_API int jsmn_parse(jsmn_parser *parser, const char *js, const size_t len, - jsmntok_t *tokens, const unsigned int num_tokens) { - int r; - int i; - jsmntok_t *token; - int count = parser->toknext; - - for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { - char c; - jsmntype_t type; - - c = js[parser->pos]; - switch (c) { - case '{': - case '[': - count++; - if (tokens == NULL) { - break; - } - token = jsmn_alloc_token(parser, tokens, num_tokens); - if (token == NULL) { - return JSMN_ERROR_NOMEM; - } - if (parser->toksuper != -1) { - jsmntok_t *t = &tokens[parser->toksuper]; -#ifdef JSMN_STRICT - /* In strict mode an object or array can't become a key */ - if (t->type == JSMN_OBJECT) { - return JSMN_ERROR_INVAL; - } -#endif - t->size++; -#ifdef JSMN_PARENT_LINKS - token->parent = parser->toksuper; -#endif - } - token->type = (c == '{' ? JSMN_OBJECT : JSMN_ARRAY); - token->start = parser->pos; - parser->toksuper = parser->toknext - 1; - break; - case '}': - case ']': - if (tokens == NULL) { - break; - } - type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY); -#ifdef JSMN_PARENT_LINKS - if (parser->toknext < 1) { - return JSMN_ERROR_INVAL; - } - token = &tokens[parser->toknext - 1]; - for (;;) { - if (token->start != -1 && token->end == -1) { - if (token->type != type) { - return JSMN_ERROR_INVAL; - } - token->end = parser->pos + 1; - parser->toksuper = token->parent; - break; - } - if (token->parent == -1) { - if (token->type != type || parser->toksuper == -1) { - return JSMN_ERROR_INVAL; - } - break; - } - token = &tokens[token->parent]; - } -#else - for (i = parser->toknext - 1; i >= 0; i--) { - token = &tokens[i]; - if (token->start != -1 && token->end == -1) { - if (token->type != type) { - return JSMN_ERROR_INVAL; - } - parser->toksuper = -1; - token->end = parser->pos + 1; - break; - } - } - /* Error if unmatched closing bracket */ - if (i == -1) { - return JSMN_ERROR_INVAL; - } - for (; i >= 0; i--) { - token = &tokens[i]; - if (token->start != -1 && token->end == -1) { - parser->toksuper = i; - break; - } - } -#endif - break; - case '\"': - r = jsmn_parse_string(parser, js, len, tokens, num_tokens); - if (r < 0) { - return r; - } - count++; - if (parser->toksuper != -1 && tokens != NULL) { - tokens[parser->toksuper].size++; - } - break; - case '\t': - case '\r': - case '\n': - case ' ': - break; - case ':': - parser->toksuper = parser->toknext - 1; - break; - case ',': - if (tokens != NULL && parser->toksuper != -1 && - tokens[parser->toksuper].type != JSMN_ARRAY && - tokens[parser->toksuper].type != JSMN_OBJECT) { -#ifdef JSMN_PARENT_LINKS - parser->toksuper = tokens[parser->toksuper].parent; -#else - for (i = parser->toknext - 1; i >= 0; i--) { - if (tokens[i].type == JSMN_ARRAY || tokens[i].type == JSMN_OBJECT) { - if (tokens[i].start != -1 && tokens[i].end == -1) { - parser->toksuper = i; - break; - } - } - } -#endif - } - break; -#ifdef JSMN_STRICT - /* In strict mode primitives are: numbers and booleans */ - case '-': - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 't': - case 'f': - case 'n': - /* And they must not be keys of the object */ - if (tokens != NULL && parser->toksuper != -1) { - const jsmntok_t *t = &tokens[parser->toksuper]; - if (t->type == JSMN_OBJECT || - (t->type == JSMN_STRING && t->size != 0)) { - return JSMN_ERROR_INVAL; - } - } -#else - /* In non-strict mode every unquoted value is a primitive */ - default: -#endif - r = jsmn_parse_primitive(parser, js, len, tokens, num_tokens); - if (r < 0) { - return r; - } - count++; - if (parser->toksuper != -1 && tokens != NULL) { - tokens[parser->toksuper].size++; - } - break; - -#ifdef JSMN_STRICT - /* Unexpected char in strict mode */ - default: - return JSMN_ERROR_INVAL; -#endif - } - } - - if (tokens != NULL) { - for (i = parser->toknext - 1; i >= 0; i--) { - /* Unmatched opened object or array */ - if (tokens[i].start != -1 && tokens[i].end == -1) { - return JSMN_ERROR_PART; - } - } - } - - return count; -} - -/** - * Creates a new parser based over a given buffer with an array of tokens - * available. - */ -JSMN_API void jsmn_init(jsmn_parser *parser) { - parser->pos = 0; - parser->toknext = 0; - parser->toksuper = -1; -} - -#endif /* JSMN_HEADER */ - -#ifdef __cplusplus -} -#endif - -#endif /* JSMN_H */ diff --git a/lib/jsmn/library.json b/lib/jsmn/library.json deleted file mode 100644 index 8e2f5c2..0000000 --- a/lib/jsmn/library.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "jsmn", - "keywords": "json", - "description": "Minimalistic JSON parser/tokenizer in C. It can be easily integrated into resource-limited or embedded projects", - "repository": - { - "type": "git", - "url": "https://github.com/zserge/jsmn.git" - }, - "frameworks": "*", - "platforms": "*", - "examples": [ - "example/*.c" - ], - "exclude": "test" -} diff --git a/lib/jsmn/test/test.h b/lib/jsmn/test/test.h deleted file mode 100644 index a1c0957..0000000 --- a/lib/jsmn/test/test.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef __TEST_H__ -#define __TEST_H__ - -static int test_passed = 0; -static int test_failed = 0; - -/* Terminate current test with error */ -#define fail() return __LINE__ - -/* Successful end of the test case */ -#define done() return 0 - -/* Check single condition */ -#define check(cond) \ - do { \ - if (!(cond)) \ - fail(); \ - } while (0) - -/* Test runner */ -static void test(int (*func)(void), const char *name) { - int r = func(); - if (r == 0) { - test_passed++; - } else { - test_failed++; - printf("FAILED: %s (at line %d)\n", name, r); - } -} - -#endif /* __TEST_H__ */ diff --git a/lib/jsmn/test/test_default b/lib/jsmn/test/test_default deleted file mode 100755 index e5bb476ff1c4de658b2f16213c5e71c6173cd277..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30288 zcmeHwdw5&bmGAK@Hg2#CO=toXRP$&IiDNqPjom=c{YqGPlGGWKwr>OFfDA`SRjF3Y(6xC!s z$S#irGM`RAxr~IGrl^t|9iU$Ius>cI_lo=H&eQL4QD6N>9RaUmEE7d>}m1p@Z~Q_=!%(hvcGOdyo=5qR+XWl`TQJ ziH8%cvnR4KPBQa%gKy2CfB7W(pPz((@g#hTOD2ETO~Stid@DZb$5Jpd;XDAoHC-9` zDtt;Z@HMnw6E)Z(&FA-aHg$Aq4u{Y0Y`V$O)OM4j#p!O>y1edAe+$XmU7cEotHbB= zYaPz^c25(On|3-KE$&WdyZdV{WC@P|ynaWA)7`1HcwH`S)!Nl7Ryr!n78W#IIW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tc((Lz31x1y=3P$A>y)VsPt=kl}U8XDr zRpl!#t#{1+tNlks)jpikPp|(^q`hiCtx9T2TCFw~C0qF|v)a#)pz@V{`g;-8dk~d= zdiiv}Y_?bXB?e71NH71lu*Y8v@ED>p)cvD+Ut+qx$}39u-xia-+J70B3v;DM*mS78 zqOXBReUHX49qPVTy^nH)Du+Y$Pi3dt@gB%XMcJ$UoM8u9Y1$k?jI**=^leDY_F9)z z-6Ck6%qpVn6#W1Kv%R|Cs@ozgl%MJLD*tCB2ut~|*6mxi2#s|6wC2?4zZ0nZa-nXV zmA%|9G5DlQhncFrCnVy$bBmz5900T}LbrOV-fI3OvGQG5i1VOZ(A+eKRk=!+{L5s2 ORNheLrx~PWwf_Udjj>Ar diff --git a/lib/jsmn/test/test_links b/lib/jsmn/test/test_links deleted file mode 100755 index 9f1b9d93a21f44e5e29f30fb960f5079750a04c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30288 zcmeHw4RlmhmhR0Ti4jvlK=G#^Wdt86ge3e1K@&*9g(ez-_%kFHMN%OZl1jRMAQ4JJ z7g5XVl1z{EWBO?i)3!b8^f*kn_KUXif-*uo{S^B-J!qpw8@0-$?X(ScbkKU=-shZK zw<Rcwvv$uLLaGXP2MF-cE_mrFhcm4yUJZnUkB48o?M zCi_8hSwxWaRJeQ&5j9OgMK{_jV={GKY!V){h^m5SIWi?$E9lXdWY{kIeV>F%j;bU# zB;|&roPvGQ5eh1Ql27P&RO(BG6`;|kAo0>x^}es3$`xz5It)&f?J20_Zh@S1wGjM@ zy>k0{+1_Y=nI`R5P&Tj4Yj$m!*IYlh+2!`P&uw3_Xzro~h2GY}60}P;O~H?1YV}Rk zTF-*tt@+*Coew;4<%0u1Jo_{6#FkrT5f9lw`iO@%;#ck`I1xXhi+=4vN#F>+=6pqt z1l5Lb4xla`j>d5^GJY5E))Dxx8-;)JDEJwp;K?r|*>m$K_yfRO@k`xGffz~8-vMt; zWk$UWzk(6)8pf}V25gb$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(Nc6))hN?9{_Q|ehR$LkSEi~?U^W>jUD+vO{))9O4vug~AmfMViH zCw5CAP>Ratwn_IUyn(g(zR*%>2@V9Gqtu1ZMPCQ*uxOo1OqLG>Cqbn{u zKLTOL6G@&9d};*`LD}p5EiD}oG1cs3OcE(ZpBA;aCH zsGhqaQ3`!ytSCO^7lo3omSXZD7`yQh4EKhmOcp`o7O&UbuS8Vxw}_aRT`CNRJLvf% zNYH~y5XUEoRCv<2iAMb35G#>gE`f~s`$x&fYlYs97N27apwA;R~?#f^^s;6 zM+ZkChCwSt5^F(XQVH=t2Wedcry|U`#P*mhD42Q$LA>VeYE)<~LCLG@RR!fV!VppC zU4>YbBCoD%6|^cw2~*`Ofd3S03#xs!-lCvtUoJx!>oZF2O(@V@Ny)40WCfSV4%4y; z6?yRkP_2vHiZV`BhP+zeQSb<8<}KBK^v(}jJ5lYc>uv>=|CRlUPr+@Fr?nVWSJ&qX z7Rkm_?N>J4g#!6h$*b#l1$!lAQBF~>J(wbYP%{V)1UBQP_)lxStQtZM&+f>}QGyNK#Lh>Ab8 zeY##Y%d7Pg1EvV1w*O1W=ix`k5N+!EQGG8lm0#5rr0Z`Beo9`gzYNNWx#A<;w5hs+ z?*d1$r{vW-jrtyCA9W6!icck{#_<4X#G>TYdd^8ZNom?F0gSzpSMVcH%<@{BWZf)a zm8>eD@+rfq(ck{5{UX6`?3KJ+ zE-~=LOPd)Qu`5WtZ{I8`x;y~rvWG6ARKHdJC9<+zNQix}OTf$&gH^kVm+Tu!{;0g5 Nq}P0#x0I^(e*jJKUJU>M diff --git a/lib/jsmn/test/test_strict b/lib/jsmn/test/test_strict deleted file mode 100755 index 7c0841ab4851f6c75eee5af1c8d31ea884fdd06e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30288 zcmeHwe|%fjmFM%X*fEJ^XaeEKG{S^V42k0(A&CP4J6O&Oje|*I3KKhuY|FNSZMl|| z*fl0jWm8mD;4XyHF0|>ES(t9iq!c=anWP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kxd%qk6uCL@D&m zwxalyUldBUT8hbsJsjr49$XuivRDL-bv~c9UdgEBZxJysyHpqschGY-ke~;0AdXKE zsqmz46OH@9Ayy)*TnZWM_m5JI*NS{yZGLARpua=FW|hM8m#&U>tq4!tx{8`Sfug#A z8=ui~H%L_Z+6{~R&L)j%%}!slR@Bhtfj$BK9fBgCB1_3QKuw)69MhVU~cRh;t`bjg4qs~!;X3&Z- zh_zv0QUl^&25DadmmMyA@RaSN1DD1@DAB?Zv3PTAwQ@r+vKNWVK(} z^kpQ-r%GO};}z_ejH>+f`tOqRYbBpr?<@GYMV_XJ>GBT(M|P?GFq)$AA)%aBN~EyW z%peiQ&nmA=IR$rEnUPLYuRW9|zh5#asO(j0R9?Y-Y4U2`rr@Ism85{Ge1)a?j@5p( zZ=s;thg1C2R@UP?$dJ5hKdnqsC9I*~wj9cCh5ElpSmo2di%9EI>ychQt(UFxYQIFm zsx*Q0@}Gx1{>jFDh{{pxNATYe$JqSwBb2F0nD?KSMVKBtnymBWZf!YmCP!jk diff --git a/lib/jsmn/test/tests.c b/lib/jsmn/test/tests.c deleted file mode 100644 index d8a4d92..0000000 --- a/lib/jsmn/test/tests.c +++ /dev/null @@ -1,359 +0,0 @@ -#include -#include -#include -#include - -#include "test.h" -#include "testutil.h" - -int test_empty(void) { - check(parse("{}", 1, 1, JSMN_OBJECT, 0, 2, 0)); - check(parse("[]", 1, 1, JSMN_ARRAY, 0, 2, 0)); - check(parse("[{},{}]", 3, 3, JSMN_ARRAY, 0, 7, 2, JSMN_OBJECT, 1, 3, 0, - JSMN_OBJECT, 4, 6, 0)); - return 0; -} - -int test_object(void) { - check(parse("{\"a\":0}", 3, 3, JSMN_OBJECT, 0, 7, 1, JSMN_STRING, "a", 1, - JSMN_PRIMITIVE, "0")); - check(parse("{\"a\":[]}", 3, 3, JSMN_OBJECT, 0, 8, 1, JSMN_STRING, "a", 1, - JSMN_ARRAY, 5, 7, 0)); - check(parse("{\"a\":{},\"b\":{}}", 5, 5, JSMN_OBJECT, -1, -1, 2, JSMN_STRING, - "a", 1, JSMN_OBJECT, -1, -1, 0, JSMN_STRING, "b", 1, JSMN_OBJECT, - -1, -1, 0)); - check(parse("{\n \"Day\": 26,\n \"Month\": 9,\n \"Year\": 12\n }", 7, 7, - JSMN_OBJECT, -1, -1, 3, JSMN_STRING, "Day", 1, JSMN_PRIMITIVE, - "26", JSMN_STRING, "Month", 1, JSMN_PRIMITIVE, "9", JSMN_STRING, - "Year", 1, JSMN_PRIMITIVE, "12")); - check(parse("{\"a\": 0, \"b\": \"c\"}", 5, 5, JSMN_OBJECT, -1, -1, 2, - JSMN_STRING, "a", 1, JSMN_PRIMITIVE, "0", JSMN_STRING, "b", 1, - JSMN_STRING, "c", 0)); - -#ifdef JSMN_STRICT - check(parse("{\"a\"\n0}", JSMN_ERROR_INVAL, 3)); - check(parse("{\"a\", 0}", JSMN_ERROR_INVAL, 3)); - check(parse("{\"a\": {2}}", JSMN_ERROR_INVAL, 3)); - check(parse("{\"a\": {2: 3}}", JSMN_ERROR_INVAL, 3)); - check(parse("{\"a\": {\"a\": 2 3}}", JSMN_ERROR_INVAL, 5)); -/* FIXME */ -/*check(parse("{\"a\"}", JSMN_ERROR_INVAL, 2));*/ -/*check(parse("{\"a\": 1, \"b\"}", JSMN_ERROR_INVAL, 4));*/ -/*check(parse("{\"a\",\"b\":1}", JSMN_ERROR_INVAL, 4));*/ -/*check(parse("{\"a\":1,}", JSMN_ERROR_INVAL, 4));*/ -/*check(parse("{\"a\":\"b\":\"c\"}", JSMN_ERROR_INVAL, 4));*/ -/*check(parse("{,}", JSMN_ERROR_INVAL, 4));*/ -#endif - return 0; -} - -int test_array(void) { - /* FIXME */ - /*check(parse("[10}", JSMN_ERROR_INVAL, 3));*/ - /*check(parse("[1,,3]", JSMN_ERROR_INVAL, 3)*/ - check(parse("[10]", 2, 2, JSMN_ARRAY, -1, -1, 1, JSMN_PRIMITIVE, "10")); - check(parse("{\"a\": 1]", JSMN_ERROR_INVAL, 3)); - /* FIXME */ - /*check(parse("[\"a\": 1]", JSMN_ERROR_INVAL, 3));*/ - return 0; -} - -int test_primitive(void) { - check(parse("{\"boolVar\" : true }", 3, 3, JSMN_OBJECT, -1, -1, 1, - JSMN_STRING, "boolVar", 1, JSMN_PRIMITIVE, "true")); - check(parse("{\"boolVar\" : false }", 3, 3, JSMN_OBJECT, -1, -1, 1, - JSMN_STRING, "boolVar", 1, JSMN_PRIMITIVE, "false")); - check(parse("{\"nullVar\" : null }", 3, 3, JSMN_OBJECT, -1, -1, 1, - JSMN_STRING, "nullVar", 1, JSMN_PRIMITIVE, "null")); - check(parse("{\"intVar\" : 12}", 3, 3, JSMN_OBJECT, -1, -1, 1, JSMN_STRING, - "intVar", 1, JSMN_PRIMITIVE, "12")); - check(parse("{\"floatVar\" : 12.345}", 3, 3, JSMN_OBJECT, -1, -1, 1, - JSMN_STRING, "floatVar", 1, JSMN_PRIMITIVE, "12.345")); - return 0; -} - -int test_string(void) { - check(parse("{\"strVar\" : \"hello world\"}", 3, 3, JSMN_OBJECT, -1, -1, 1, - JSMN_STRING, "strVar", 1, JSMN_STRING, "hello world", 0)); - check(parse("{\"strVar\" : \"escapes: \\/\\r\\n\\t\\b\\f\\\"\\\\\"}", 3, 3, - JSMN_OBJECT, -1, -1, 1, JSMN_STRING, "strVar", 1, JSMN_STRING, - "escapes: \\/\\r\\n\\t\\b\\f\\\"\\\\", 0)); - check(parse("{\"strVar\": \"\"}", 3, 3, JSMN_OBJECT, -1, -1, 1, JSMN_STRING, - "strVar", 1, JSMN_STRING, "", 0)); - check(parse("{\"a\":\"\\uAbcD\"}", 3, 3, JSMN_OBJECT, -1, -1, 1, JSMN_STRING, - "a", 1, JSMN_STRING, "\\uAbcD", 0)); - check(parse("{\"a\":\"str\\u0000\"}", 3, 3, JSMN_OBJECT, -1, -1, 1, - JSMN_STRING, "a", 1, JSMN_STRING, "str\\u0000", 0)); - check(parse("{\"a\":\"\\uFFFFstr\"}", 3, 3, JSMN_OBJECT, -1, -1, 1, - JSMN_STRING, "a", 1, JSMN_STRING, "\\uFFFFstr", 0)); - check(parse("{\"a\":[\"\\u0280\"]}", 4, 4, JSMN_OBJECT, -1, -1, 1, - JSMN_STRING, "a", 1, JSMN_ARRAY, -1, -1, 1, JSMN_STRING, - "\\u0280", 0)); - - check(parse("{\"a\":\"str\\uFFGFstr\"}", JSMN_ERROR_INVAL, 3)); - check(parse("{\"a\":\"str\\u@FfF\"}", JSMN_ERROR_INVAL, 3)); - check(parse("{{\"a\":[\"\\u028\"]}", JSMN_ERROR_INVAL, 4)); - return 0; -} - -int test_partial_string(void) { - int r; - unsigned long i; - jsmn_parser p; - jsmntok_t tok[5]; - const char *js = "{\"x\": \"va\\\\ue\", \"y\": \"value y\"}"; - - jsmn_init(&p); - for (i = 1; i <= strlen(js); i++) { - r = jsmn_parse(&p, js, i, tok, sizeof(tok) / sizeof(tok[0])); - if (i == strlen(js)) { - check(r == 5); - check(tokeq(js, tok, 5, JSMN_OBJECT, -1, -1, 2, JSMN_STRING, "x", 1, - JSMN_STRING, "va\\\\ue", 0, JSMN_STRING, "y", 1, JSMN_STRING, - "value y", 0)); - } else { - check(r == JSMN_ERROR_PART); - } - } - return 0; -} - -int test_partial_array(void) { -#ifdef JSMN_STRICT - int r; - unsigned long i; - jsmn_parser p; - jsmntok_t tok[10]; - const char *js = "[ 1, true, [123, \"hello\"]]"; - - jsmn_init(&p); - for (i = 1; i <= strlen(js); i++) { - r = jsmn_parse(&p, js, i, tok, sizeof(tok) / sizeof(tok[0])); - if (i == strlen(js)) { - check(r == 6); - check(tokeq(js, tok, 6, JSMN_ARRAY, -1, -1, 3, JSMN_PRIMITIVE, "1", - JSMN_PRIMITIVE, "true", JSMN_ARRAY, -1, -1, 2, JSMN_PRIMITIVE, - "123", JSMN_STRING, "hello", 0)); - } else { - check(r == JSMN_ERROR_PART); - } - } -#endif - return 0; -} - -int test_array_nomem(void) { - int i; - int r; - jsmn_parser p; - jsmntok_t toksmall[10], toklarge[10]; - const char *js; - - js = " [ 1, true, [123, \"hello\"]]"; - - for (i = 0; i < 6; i++) { - jsmn_init(&p); - memset(toksmall, 0, sizeof(toksmall)); - memset(toklarge, 0, sizeof(toklarge)); - r = jsmn_parse(&p, js, strlen(js), toksmall, i); - check(r == JSMN_ERROR_NOMEM); - - memcpy(toklarge, toksmall, sizeof(toksmall)); - - r = jsmn_parse(&p, js, strlen(js), toklarge, 10); - check(r >= 0); - check(tokeq(js, toklarge, 4, JSMN_ARRAY, -1, -1, 3, JSMN_PRIMITIVE, "1", - JSMN_PRIMITIVE, "true", JSMN_ARRAY, -1, -1, 2, JSMN_PRIMITIVE, - "123", JSMN_STRING, "hello", 0)); - } - return 0; -} - -int test_unquoted_keys(void) { -#ifndef JSMN_STRICT - int r; - jsmn_parser p; - jsmntok_t tok[10]; - const char *js; - - jsmn_init(&p); - js = "key1: \"value\"\nkey2 : 123"; - - r = jsmn_parse(&p, js, strlen(js), tok, 10); - check(r >= 0); - check(tokeq(js, tok, 4, JSMN_PRIMITIVE, "key1", JSMN_STRING, "value", 0, - JSMN_PRIMITIVE, "key2", JSMN_PRIMITIVE, "123")); -#endif - return 0; -} - -int test_issue_22(void) { - int r; - jsmn_parser p; - jsmntok_t tokens[128]; - const char *js; - - js = - "{ \"height\":10, \"layers\":[ { \"data\":[6,6], \"height\":10, " - "\"name\":\"Calque de Tile 1\", \"opacity\":1, \"type\":\"tilelayer\", " - "\"visible\":true, \"width\":10, \"x\":0, \"y\":0 }], " - "\"orientation\":\"orthogonal\", \"properties\": { }, \"tileheight\":32, " - "\"tilesets\":[ { \"firstgid\":1, \"image\":\"..\\/images\\/tiles.png\", " - "\"imageheight\":64, \"imagewidth\":160, \"margin\":0, " - "\"name\":\"Tiles\", " - "\"properties\":{}, \"spacing\":0, \"tileheight\":32, \"tilewidth\":32 " - "}], " - "\"tilewidth\":32, \"version\":1, \"width\":10 }"; - jsmn_init(&p); - r = jsmn_parse(&p, js, strlen(js), tokens, 128); - check(r >= 0); - return 0; -} - -int test_issue_27(void) { - const char *js = - "{ \"name\" : \"Jack\", \"age\" : 27 } { \"name\" : \"Anna\", "; - check(parse(js, JSMN_ERROR_PART, 8)); - return 0; -} - -int test_input_length(void) { - const char *js; - int r; - jsmn_parser p; - jsmntok_t tokens[10]; - - js = "{\"a\": 0}garbage"; - - jsmn_init(&p); - r = jsmn_parse(&p, js, 8, tokens, 10); - check(r == 3); - check(tokeq(js, tokens, 3, JSMN_OBJECT, -1, -1, 1, JSMN_STRING, "a", 1, - JSMN_PRIMITIVE, "0")); - return 0; -} - -int test_count(void) { - jsmn_parser p; - const char *js; - - js = "{}"; - jsmn_init(&p); - check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 1); - - js = "[]"; - jsmn_init(&p); - check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 1); - - js = "[[]]"; - jsmn_init(&p); - check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 2); - - js = "[[], []]"; - jsmn_init(&p); - check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 3); - - js = "[[], []]"; - jsmn_init(&p); - check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 3); - - js = "[[], [[]], [[], []]]"; - jsmn_init(&p); - check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 7); - - js = "[\"a\", [[], []]]"; - jsmn_init(&p); - check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 5); - - js = "[[], \"[], [[]]\", [[]]]"; - jsmn_init(&p); - check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 5); - - js = "[1, 2, 3]"; - jsmn_init(&p); - check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 4); - - js = "[1, 2, [3, \"a\"], null]"; - jsmn_init(&p); - check(jsmn_parse(&p, js, strlen(js), NULL, 0) == 7); - - return 0; -} - -int test_nonstrict(void) { -#ifndef JSMN_STRICT - const char *js; - js = "a: 0garbage"; - check(parse(js, 2, 2, JSMN_PRIMITIVE, "a", JSMN_PRIMITIVE, "0garbage")); - - js = "Day : 26\nMonth : Sep\n\nYear: 12"; - check(parse(js, 6, 6, JSMN_PRIMITIVE, "Day", JSMN_PRIMITIVE, "26", - JSMN_PRIMITIVE, "Month", JSMN_PRIMITIVE, "Sep", JSMN_PRIMITIVE, - "Year", JSMN_PRIMITIVE, "12")); - - /* nested {s don't cause a parse error. */ - js = "\"key {1\": 1234"; - check(parse(js, 2, 2, JSMN_STRING, "key {1", 1, JSMN_PRIMITIVE, "1234")); - -#endif - return 0; -} - -int test_unmatched_brackets(void) { - const char *js; - js = "\"key 1\": 1234}"; - check(parse(js, JSMN_ERROR_INVAL, 2)); - js = "{\"key 1\": 1234"; - check(parse(js, JSMN_ERROR_PART, 3)); - js = "{\"key 1\": 1234}}"; - check(parse(js, JSMN_ERROR_INVAL, 3)); - js = "\"key 1\"}: 1234"; - check(parse(js, JSMN_ERROR_INVAL, 3)); - js = "{\"key {1\": 1234}"; - check(parse(js, 3, 3, JSMN_OBJECT, 0, 16, 1, JSMN_STRING, "key {1", 1, - JSMN_PRIMITIVE, "1234")); - js = "{\"key 1\":{\"key 2\": 1234}"; - check(parse(js, JSMN_ERROR_PART, 5)); - return 0; -} - -int test_object_key(void) { - const char *js; - - js = "{\"key\": 1}"; - check(parse(js, 3, 3, JSMN_OBJECT, 0, 10, 1, JSMN_STRING, "key", 1, - JSMN_PRIMITIVE, "1")); -#ifdef JSMN_STRICT - js = "{true: 1}"; - check(parse(js, JSMN_ERROR_INVAL, 3)); - js = "{1: 1}"; - check(parse(js, JSMN_ERROR_INVAL, 3)); - js = "{{\"key\": 1}: 2}"; - check(parse(js, JSMN_ERROR_INVAL, 5)); - js = "{[1,2]: 2}"; - check(parse(js, JSMN_ERROR_INVAL, 5)); -#endif - return 0; -} - -int main(void) { - test(test_empty, "test for a empty JSON objects/arrays"); - test(test_object, "test for a JSON objects"); - test(test_array, "test for a JSON arrays"); - test(test_primitive, "test primitive JSON data types"); - test(test_string, "test string JSON data types"); - - test(test_partial_string, "test partial JSON string parsing"); - test(test_partial_array, "test partial array reading"); - test(test_array_nomem, "test array reading with a smaller number of tokens"); - test(test_unquoted_keys, "test unquoted keys (like in JavaScript)"); - test(test_input_length, "test strings that are not null-terminated"); - test(test_issue_22, "test issue #22"); - test(test_issue_27, "test issue #27"); - test(test_count, "test tokens count estimation"); - test(test_nonstrict, "test for non-strict mode"); - test(test_unmatched_brackets, "test for unmatched brackets"); - test(test_object_key, "test for key type"); - printf("\nPASSED: %d\nFAILED: %d\n", test_passed, test_failed); - return (test_failed > 0); -} diff --git a/lib/jsmn/test/testutil.h b/lib/jsmn/test/testutil.h deleted file mode 100644 index b4a51b5..0000000 --- a/lib/jsmn/test/testutil.h +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef __TEST_UTIL_H__ -#define __TEST_UTIL_H__ - -#include "../jsmn.h" - -static int vtokeq(const char *s, jsmntok_t *t, unsigned long numtok, - va_list ap) { - if (numtok > 0) { - unsigned long i; - int start, end, size; - int type; - char *value; - - size = -1; - value = NULL; - for (i = 0; i < numtok; i++) { - type = va_arg(ap, int); - if (type == JSMN_STRING) { - value = va_arg(ap, char *); - size = va_arg(ap, int); - start = end = -1; - } else if (type == JSMN_PRIMITIVE) { - value = va_arg(ap, char *); - start = end = size = -1; - } else { - start = va_arg(ap, int); - end = va_arg(ap, int); - size = va_arg(ap, int); - value = NULL; - } - if (t[i].type != type) { - printf("token %lu type is %d, not %d\n", i, t[i].type, type); - return 0; - } - if (start != -1 && end != -1) { - if (t[i].start != start) { - printf("token %lu start is %d, not %d\n", i, t[i].start, start); - return 0; - } - if (t[i].end != end) { - printf("token %lu end is %d, not %d\n", i, t[i].end, end); - return 0; - } - } - if (size != -1 && t[i].size != size) { - printf("token %lu size is %d, not %d\n", i, t[i].size, size); - return 0; - } - - if (s != NULL && value != NULL) { - const char *p = s + t[i].start; - if (strlen(value) != (unsigned long)(t[i].end - t[i].start) || - strncmp(p, value, t[i].end - t[i].start) != 0) { - printf("token %lu value is %.*s, not %s\n", i, t[i].end - t[i].start, - s + t[i].start, value); - return 0; - } - } - } - } - return 1; -} - -static int tokeq(const char *s, jsmntok_t *tokens, int numtok, ...) { - int ok; - va_list args; - va_start(args, numtok); - ok = vtokeq(s, tokens, numtok, args); - va_end(args); - return ok; -} - -static int parse(const char *s, int status, int numtok, ...) { - int r; - int ok = 1; - va_list args; - jsmn_parser p; - jsmntok_t *t = malloc(numtok * sizeof(jsmntok_t)); - - jsmn_init(&p); - r = jsmn_parse(&p, s, strlen(s), t, numtok); - if (r != status) { - printf("status is %d, not %d\n", r, status); - return 0; - } - - if (status >= 0) { - va_start(args, numtok); - ok = vtokeq(s, t, numtok, args); - va_end(args); - } - free(t); - return ok; -} - -#endif /* __TEST_UTIL_H__ */ diff --git a/syntax/stes-c.json b/syntax/stes-c.json deleted file mode 100644 index 3648f98..0000000 --- a/syntax/stes-c.json +++ /dev/null @@ -1,69 +0,0 @@ -{ "color" : "grey", "value" : 5} -{ "color" : "red", "value" : 1} -{ "color" : "blue", "value" : 2} -{ "color" : "green", "value" : 3} -{ "color" : "yellow", "value" : 4} -{ "color" : "white", "value" : 0} -{ "color" : "pink", "value" : 6} - -{ "type" : "text", "color" : "white"} - -{ - "type" : "comment", - "color" : "grey", - "start" : ["//", "/*"], - "end" : ["\n", "*/"] -} - -{ - "type" : "macro", - "color" : "pink", - "start" : "#", - "end" : " " -} - -{ - "type" : "var", - "color" : "blue", - "match" : // must have a whitespace after match - [ - "int", "char", - "float", "double", - "void", "NULL" - ], - "start" : - [ - "int", "uint", - "int_least", "uint_least", - "int_fast", "uint_fast", - "intptr", "uintptr", - "intmax", "uintmax" - ], - "end" : "_t" -} - -{ - "type" : "struct", - "color" : "green", - "match" : - [ - "struct", "enum", - "union", "typedef" - ] -} - -{ - "type" : "attribute", - "color" : "yellow", - "match" : - [ - "static", "const", - "short", "long", - "signed", "unsigned", - "inline", "register" - ] -} - -{ - "ignore" : ["(", ")", "[", "]", "{", "}"] -} \ No newline at end of file