This commit adds a new Fuzzer class, which encapsulates the logic from Driver and allows it to be applied to the new Reader, Writer, and Rewriter classes. Another global change is the addition of a stack of wellformedness contexts. By calling wf::new_context and wf::end_context, it is possible to have nested Trieste pass ranges execute. This allows a Trieste pass to execute another Trieste pass as part of its execution (e.g. to parse a string using the JSON parser and the convert the resulting AST to a language-specific format). Finally, this commit changes NodeRange to be a std::span (NB an equivalent class is provided for C++17).
YAML
Fixed a bug with block indents that contain YAML or JSON
Fixed a bug where a colon is immediately adjacent to the start of a flow construct
Fixed a bug with colons immediately adjacent to values inside flow constructs
Fixed an overeager error message for comments that look like mapping keys
Fixed a bug with bad aliases in to_json
JSON
Added unescape and escape functions for handling JSON strings
Added a symbol table to Object and a Key token to make JSON ASTs easier to use
Misc
Added some code to mitigate situations in which P(c | d, p) is uniform during fuzzing.
Added find_first and contains methods on Node which implement Token specific logic.
Added postparse and output_wf properties for Reader
Added input_wf, output_wf and passes properties for Rewriter
This commit adds a new
Fuzzer
class, which encapsulates the logic fromDriver
and allows it to be applied to the newReader
,Writer
, andRewriter
classes. Another global change is the addition of a stack of wellformedness contexts. By callingwf::new_context
andwf::end_context
, it is possible to have nested Trieste pass ranges execute. This allows a Trieste pass to execute another Trieste pass as part of its execution (e.g. to parse a string using the JSON parser and the convert the resulting AST to a language-specific format). Finally, this commit changesNodeRange
to be astd::span
(NB an equivalent class is provided for C++17).YAML
to_json
JSON
unescape
andescape
functions for handling JSON stringsObject
and aKey
token to make JSON ASTs easier to useMisc
find_first
andcontains
methods onNode
which implementToken
specific logic.postparse
andoutput_wf
properties forReader
input_wf
,output_wf
andpasses
properties forRewriter
input_wf
andpasses
properties forWriter