Awesome! Will definitely be reading and trying it out :) Are there plans to support the reverse operation? To transform json to ATS3 ASTs?
On Sunday, December 22, 2019 at 6:36:46 PM UTC-8, Richard wrote: > > Hello all, > > Here is an ats3 compiler extension that I have been working on called > "xjsonize", see https://github.com/sparverius/xjsonize > > Brief overview, > > - written in ats2 > - similar to xinterp, links the ats3 compiler library (libxatsopt) > - exports the AST at any level of compilation as json > - provides a library libxjsonize > - link other extensions with -lxjsonize > - for example, https://github.com/sparverius/xatscc, > - this example links both libxatsopt and libxjsonize to xinterp > for jsonizing the the tree of the interpreter > > Later versions can suite specific needs however, for now the jsonized > output is currently meant to be as verbose as possible with the exception > of location information (coming soon!). Also, the labify branch > <https://github.com/sparverius/xjsonize/tree/labify> provides a flatter > representation than the master branch. > > > Some examples of the exported json can be found HERE > <https://github.com/sparverius/xatscc/tree/master/doc/example/map>. > > > Possible use cases: > > - Learn about each translation phase of the ats3 compiler > - Export AST to write extensions in any programming language you wish. > (some examples soon!) > - Something else you think ofentirely?? > > Personally, reading through the AST in json form has helped me > tremendously with understanding the compilation phases of ats3. I hope you > find it useful as well! > > > Cheers! > -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/f68f8a41-3445-418e-967b-66e651e65793%40googlegroups.com.