Skip to content

Commit

Permalink
Added atomicity checks in jsn where string argument is expected.
Browse files Browse the repository at this point in the history
  • Loading branch information
BartJongejan committed Sep 6, 2014
1 parent 99f835b commit 3667787
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
6 September 2014
Added atomicity checks in jsn where string argument is expected.
Nevertheless, jsn is not validating. Garbage in, garbage out.

1 September 2014
Decimals in floating point numbers (JSON) were not counted correctly.

Expand Down
14 changes: 9 additions & 5 deletions src/bracmat.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,14 @@ Test coverage:

*/

#define DATUM "5 September 2014"
#define DATUM "6 September 2014"
#define VERSION "6"
#define BUILD "186"
/* 5 September 2014
#define BUILD "187"
/* 6 September 2014
Added atomicity checks in jsn where string argument is expected.
Nevertheless, jsn is not validating. Garbage in, garbage out.

5 September 2014
Added built-in, but redefinable function jsn. This function converts a properly
constructed Bracmat datastructure to a string containing JSON.

Expand Down Expand Up @@ -17655,10 +17659,10 @@ int startProc(

"(cos=(.1/2*(e^(i*!arg)+e^(-i*!arg)))),",

"(jsn=Q R O C T H I X Y.(Q=.!arg:(,?arg)&R$!arg|!arg:(.?arg)&I$!arg|!arg:(|("
"(jsn=Q R O C T H I X Y.(Q=.!arg:(,?arg)&R$!arg|!arg:(.?@arg)&I$!arg|!arg:(|("
"?.?)+?)&O$!arg|!arg:(true|false|null)|!arg:/&(X$!arg|Y$(!arg,20))|!arg)&(R="
"J S L.\333:?S&whl'(!arg:%?J ?arg&\254 Q$!J !S:?S)&(!S:\254 ?S|)&\335 !S:?S&"
":?L&whl'(!S:%?a ?S&!a !L:?L)&str$!L)&(O=J V S.:?S&whl'(!arg:(?J.?V)+?arg&!S"
":?L&whl'(!S:%?a ?S&!a !L:?L)&str$!L)&(O=J V S.:?S&whl'(!arg:(?@J.?V)+?arg&!S"
" \254 I$!J \272 Q$!V:?S)&(!S:\254 ?S|)&str$(\373 !S \375))&(C=a c z.@(!arg:"
"?a (%@:<\240:?c) ?z)&str$(!a (!c:\210&\334\342|!c:\212&\334\356|!c:\215&"
"\334\362|!c:\214&\334\346|!c:\211&\334\364|\334\365\260\260 d2x$(asc$!c)) C"
Expand Down

0 comments on commit 3667787

Please sign in to comment.