Subject: [Jsonpath] ABNF

From: Carsten Bormann <[email-masked]>
Date: Tue, 15 Jun 2021 18:10:03 +0200

Just for your amusement...

I fixed up the ABNF a bit so it actually parses, and here are a few queries that have been generated as examples by abnfgen.  (I hope there aren’t too many insulting emojis in there…)
The queries are encoded in JSON strings so you can see the various control characters, but of course now they are in backslash hell.
Enjoy a nice puzzle for the evening fireplace…

I like these example generators a lot; for instance the below reminds us that “in” can be written as “In”, “iN”, etc.  To be fixed in future PRs.

Updated #102 forthcoming...

Grüße, Carsten

001: "$"
002: "$[\t \t\r\n  9\n\r:-1\n,:\n\r\t].􉬃896󶕲"
003: "$[35]"
004: "$[*]"
005: "$[?(@ In <TO BE DEFINED>||@&&@.b[-3249]>=$.*&&@[-0].r񖣵[8]>@&&@~=<TO BE DEFINED>||@._ iN <TO BE DEFINED>||@[\"񛃦\"]||@._S񮴫q&&@&&@.򥢺[\"!\"]._['\"\\r']||@['\\'\"']~=<TO BE DEFINED>)][*][\"\"]"
006: "$[ \n: \n\t\r\r,\n-0:\r:,\r\t\n\"\",\"'\" ]"
007: "$[0 \r :,-0\r\t: \r\r\n 0:  \t\r\t    \n\n\n]"
008: "$.*[\"\"]"
009: "$..[*]"
010: "$[\n\"\\\"\\r\\\"\\\"\",0\r,\r83 :\r-21,2\n,\t'>' \n,\t402  ,\t\t:-7110404\r,\t '\\''\t][*].񒖜"
011: "$[?@[''][0].E[17]._񨠎[-793]~=<TO BE DEFINED>&&@.𪯌.o&&@!=@.𔀍||@.j IN <TO BE DEFINED>&&@[\"'$\"]~=<TO BE DEFINED>&&@[-0]][?(@>false)][-95:\r-9\n:-0\r][-28 ,'' ,\r0]"
012: "$[\t0\n\n:][?@.S.󵄂[\">\"] IN <TO BE DEFINED>||@>=false||@._z񼇘._y&&@ iN <TO BE DEFINED>]"
013: "$.X_..[291]"
014: "$..[*][\n\t\n\n:\r\n\n\r\n-6:6\n\r, \t\n \t\r: :\r \t\r\t \t][\r\t\"\\\\\\\"'\"\n,\t-6\n:: \n\n\n,0\n:\n-0\n].N4_󧩢"
015: "$.*[*]"
016: "$[\n:\t\t\r\n\t\r\r]..*.򿡰[ \t\n\r'',\n-8\n \r].󗇥7"
017: "$[?!(@~=<TO BE DEFINED>)][*]..['\\'\\'\\f\"']"
018: "$[?!(@&&@.J In <TO BE DEFINED>)]"
019: "$.󡰟[\t :\n\r\n\r-3][  \r:  \t\n\t:616,0\n\n:0][?!(@&&@~=<TO BE DEFINED>||@['']&&@.Ox.q5_&&@!='')][*][9566]"
020: "$.𴣪__򘇧_"
021: "$.*"
022: "$[-71\r\n:\r\r0].*..*[0 :0\t\n:\r -5550\n\r][?@.__B&&@[-3]||@>=true]"
023: "$.._9..['\\'\\bB']"
024: "$[?@ In <TO BE DEFINED>]"
025: "$.*[\t0,\n:\r-86\n\r\t\r:\n\t\n \t  \r19\r].*['',:\r\n:\r\t\r,\"\"\n\n,\t\"\"][\n   \r:92\t,\r-0: \r304: ,\r '\\n'\t\r,\t \t\r\r\n: \r\r2\t:\t\n\r\n,\n6\n ]"
026: "$[\n\n::\t\r]._[?@._YZ~=<TO BE DEFINED>||@._._󙺺.𹗅v iN <TO BE DEFINED>&&@.Z_&&@ in <TO BE DEFINED>][\r\t\r\n\n\r\t:\r\t 0\n :0\r,\r:\r-5649 :\n\t\t -7640896,\r\r\t'#\\b\"!!',0\r\r:0:\r\r\r ]"
027: "$[ \r36:]"
028: "$[?(@>=null||@ In <TO BE DEFINED>||@&&@[31].򛆦[-0]['򲃆'].__7==\"\"&&@ In <TO BE DEFINED>&&@||@)]"
029: "$.*[?@ iN <TO BE DEFINED>||@&&@~=<TO BE DEFINED>&&@&&@!=$&&@~=<TO BE DEFINED>&&@]"
030: "$[\"'\\\"\"]..*['\\'',\t\"&\",\"!\",\n-6765:9:-0\n]._[-92\t:-0\r\n\n:\t]"
031: "$[\"\"]"
032: "$[?(@&&@&&@~=<TO BE DEFINED>||@._3_~=<TO BE DEFINED>)].*"
033: "$..[-950][*]"
034: "$[\"/\",\r:\t-0\n:\t\n-58\r]"
035: "$['']"
036: "$[\r:-0]"
037: "$.*['']"
038: "$[\"?\", \t:0][\"\"]"
039: "$[-0]"
040: "$[\n\t\n\t\n\n\t\r\t\r 0: \n\n -58]"
041: "$[\r\r\r \r-0,\"\"\n\n,\r\n-0\r\r \t:\t0\n:\n\r\t\r\r]"
042: "$.*._"
043: "$.*[?@[\"\\n\\\"\\\"\"].o[\"\"]&&@&&@ iN <TO BE DEFINED>||@ in <TO BE DEFINED>&&@&&@[-11]!=true&&@<=null&&@[\"\"] in <TO BE DEFINED>]._o[\n\r\"\",\n\n\n\r:,\t\t\"\"]"
044: "$[0\r:0\n:\r-7].._Qw"
045: "$.*.*"
046: "$[?@._&&@~=<TO BE DEFINED>][\t ''\t\r,\r\r \n -0\r ,\n\r-0\n \n\n\n].n0[\r\n:-758]"
047: "$.j_"