jtc
jtc copied to clipboard
doco changes
-
lib/jtc_guide.hpp: Hmmm, do you think debugging (-d) is the option regular users would ever use (and hence worth mentioning in the mini-guide)? - If so, then why-dddand not any other forms? (like-d, or-dd, or-dddd, etc)? - the number of times-dis given increasers the depth of the debugs, maybe somehow reword the debug option usage then? Or you think-dddis a compromise between the verbosity and a revealed programming logic? -
lib/wp_guide.hpp- agree, the current description of the lexemes in the mini-guide is somewhat incomplete. The semantic of the lexeme's content (<>,<txt>) in fact is overloaded and depends on the suffix (search type). E.g., in searches like<..>r,<..>R,<..>lit signifies the pattern to match (even the empty one), while in other lexemes (like<..>N,'<..>P,<..>a) it defines the namespace where the match goes. I tried summarizing that in the user guide, thus this section in the mini-guide needs to be reworked a bit deeper.
what do you think?
-
my intention was to indicate that adding debugging flags makes understanding the query logic easier when working through the examples (it certainly did for me). Maybe "you can use
-ddebug flags to see the steps the jtq engine is taking" (or similar) -
I see, searches vs namespace. When I saw your solution it github with
<>which matches the whole thing, it surprised me (but makes sense). I was thinking it's good to point out.
These are all minor, jtc is so powerful it takes a while to get your head around things 😄
2. I see, searches vs namespace. When I saw your solution it github with
<>which matches the whole thing, it surprised me (but makes sense). I was thinking it's good to point out.
yes, I see. it indeed might be confusing at first - it's the suffix of the search which defines the search behavior, e.g.: for all the numerical JSON searches:
<..>d- will search (recursively) and match the given number (e.g.:<3.14>d)<..>D- will match a JSON numeric usingREpattern (e.g.:<-?[1-3]\.>D)<>N- will match any JSON numeric and optionally will preserve it into a namespace if given (e.g.:<num>N)
Look, I will not merge this PR, but rather will work on a better wording for the lexemes explanation in the mini-guide (and will mentioned the -d option(s) too). Big thank you for your feedback.
I wrote some more doco changes. Unfortunately this current PR hasn't been closed, so I can't open a new PR.
Here are the changes: https://github.com/soniah/jtc/commit/661777b7c91cd04f7440d263e503f7359e7e3fb0
Updates made.