From fbe715880392d45452d463965dd8e046c01d78d9 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 1 Nov 2024 09:01:35 -0700 Subject: [PATCH] Expand jparse.json, fix comments in some tools --- CHANGES.md | 6 ++ jparse.json | 161 ++++++++++++++++++++++++++++++++--- test_jparse/jstr_test.sh | 2 +- test_jparse/pr_jparse_test.c | 2 +- test_jparse/pr_jparse_test.h | 2 +- 5 files changed, 156 insertions(+), 17 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c43af0e..203f812 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,6 +19,12 @@ These files are in particular: The new `JPARSE_UTF8_VERSION` is `"2.0.1 2024-11-01"`. +Expand `jparse.json` to include source files for our tools and to include +subdirectories and the tools/directories under that (in other words under +`test_jparse/`). + +Fixed comments in some tools. + ## Release 2.0.0 2024-10-31 diff --git a/jparse.json b/jparse.json index e5a4bde..8a209b1 100644 --- a/jparse.json +++ b/jparse.json @@ -1,6 +1,6 @@ { "no_comment" : "mandatory comment: because comments were removed from the original JSON spec", - "timestamp" : "Sun 29 Sep 2024 18:00:35 UTC", + "timestamp" : "Fri 01 Nov 2024 15:59:34 UTC", "name" : "jparse", "description" : "JSON parser API and tools written in C", "repo" : "https://github.com/xexyl/jparse", @@ -41,31 +41,164 @@ "tools" : [ { "name" : "jparse", - "description" : "JSON parser stand-alone tool" + "description" : "JSON parser stand-alone tool", + "files" : [ + { + "source" : "jparse_main.c", + "header" : "jparse_main.h" + } + ] }, { "name" : "jstrencode", - "description" : "tool to encode a string for JSON" + "description" : "tool to encode a string for JSON", + "files" : [ + { + "source" : "jstrencode.c", + "header" : "jstrencode.h" + } + ] }, { "name" : "jstrdecode", - "description" : "tool to decode JSON encoded strings" + "description" : "tool to decode JSON encoded strings", + "files" : [ + { + "source" : "jstrdecode.c", + "header" : "jstrdecode.h" + } + ] }, { "name" : "verge", - "description" : "tool to determine if first version is greater or equal to the second version" - }, - { - "name" : "jnum_chk", - "description" : "tool to check JSON number string conversions" - }, - { - "name" : "jnum_gen", - "description" : "tool to generate JSON number string conversion test data" + "description" : "tool to determine if first version is greater or equal to the second version", + "files" : [ + { + "source" : "verge.c", + "header" : "verge.h" + } + ] }, + { "name" : "jsemtblgen", - "description" : "tool to generate JSON semantics table" + "description" : "tool to generate JSON semantics table", + "files" : [ + { + "source" : "jsemtblgen.c", + "header" : "jsemtblgen.h" + } + ] + } + ], + "directories" : [ + { + "test_jparse" : [ + { + "tools" : [ + { + "name" : "test_jparse/jnum_chk", + "description" : "tool to check JSON number string conversions", + "files" : [ + { + "source" : "test_jparse/jnum_chk.c", + "header" : "test_jparse/jnum_chk.h" + } + ] + }, + { + "name" : "test_jparse/jnum_gen", + "description" : "tool to generate JSON number string conversion test data", + "files" : [ + { + "source" : "test_jparse/jnum_gen.c", + "header" : "test_jparse/jnum_gen.h" + } + ] + }, + { + "name" : "test_jparse/pr_jparse_test", + "description" : "test print function calls", + "files" : [ + { + "source" : "test_jparse/pr_jparse_test.c", + "header" : "test_jparse/pr_jparse_test.h" + } + ] + }, + { + "name" : "test_jparse/run_jparse_tests.sh", + "description" : "perform the complete suite of tests for the jparse repo", + "files" : [ + { + "source" : "test_jparse/run_jparse_tests.sh", + "header" : null + } + ] + }, + { + "name" : "test_jparse/jparse_test.sh", + "description" : "test JSON parser on valid and invalid JSON file(s)", + "files" : [ + { + "source" : "test_jparse/jparse_test.sh", + "header" : null + } + ] + }, + { + "name" : "test_jparse/jstr_test.sh", + "description" : "JSON string encoding and decoding tests", + "files" : [ + { + "source" : "test_jparse/jstr_test.sh", + "header" : null + } + ] + }, + { + "name" : "test_jparse/is_available.sh", + "description" : "check if a tool is an executable file, and in some cases, is sane", + "files" : [ + { + "source" : "test_jparse/is_available.sh", + "header" : null + } + ] + }, + { + "name" : "test_jparse/prep.sh", + "description" : "prep for a release - actions for make prep and make release", + "files" : [ + { + "source" : "test_jparse/prep.sh", + "header" : null + } + ] + } + ], + "subdirectories" : [ + { + "name" : "test_jparse/test_JSON", + "description" : "directories with JSON files to validate as good or bad", + "subdirectories" : [ + { + "name" : "test_jparse/test_JSON/good", + "description" : "files that must be valid JSON" + }, + { + "name" : "test_jparse/test_JSON/bad", + "description" : "files that must be invalid JSON" + }, + { + "name" : "test_jparse/test_JSON/bad_loc", + "description" : "files that must be invalid JSON, with corresponding error files, to validate error location reporting" + } + ] + } + ] + } + ] } ], "authors" : [ diff --git a/test_jparse/jstr_test.sh b/test_jparse/jstr_test.sh index fa58885..554c464 100755 --- a/test_jparse/jstr_test.sh +++ b/test_jparse/jstr_test.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# jstr_test.sh - JSON string encoding and decoding test +# jstr_test.sh - JSON string encoding and decoding tests # # "Because specs w/o version numbers are forced to commit to their original design flaws." :-) # diff --git a/test_jparse/pr_jparse_test.c b/test_jparse/pr_jparse_test.c index 26fbc0c..48a5ee2 100644 --- a/test_jparse/pr_jparse_test.c +++ b/test_jparse/pr_jparse_test.c @@ -1,5 +1,5 @@ /* - * pr_jparse_test - test print function call + * pr_jparse_test - test print function calls * * Here "print function call" refers to functions such as: * diff --git a/test_jparse/pr_jparse_test.h b/test_jparse/pr_jparse_test.h index dd2e2da..02537bc 100644 --- a/test_jparse/pr_jparse_test.h +++ b/test_jparse/pr_jparse_test.h @@ -1,5 +1,5 @@ /* - * pr_jparse_test - test print function call + * pr_jparse_test - test print function calls * * "Because specs w/o version numbers are forced to commit to their original design flaws." :-) *