package atd

  1. Overview
  2. Docs
Parser for the ATD data format description language

Install

Dune Dependency

Authors

  1. M
    Martin Jambon <martin@mjambon.com>
  2. R
    Rudi Grinberg <rudi.grinberg@gmail.com>
  3. M
    Martin Jambon <martin@r2c.dev>
  4. M
    Martin Jambon <github@mjambon.com>
  5. I
    Ivan Jager <aij+git@mrph.org>
  6. O
    oleksiy <oleksiy.golovko@ahrefs.com>
  7. D
    David Sheets <sheets@alum.mit.edu>
  8. R
    Rudi Grinberg <me@rgrinberg.com>
  9. M
    Martin Jambon <martin@esper.com>
  10. J
    Jeff Meister <nanaki@gmail.com>
  11. C
    Caio Wakamatsu <caio.wakamatsu@ahrefs.com>
  12. C
    Carmelo Piccione <carmelo.piccione@gmail.com>
  13. D
    Daniel Weil <danweil68@gmail.com>
  14. E
    Egor Chemokhonenko <egor.chemohonenko@ahrefs.com>
  15. Gabriel Scherer
  16. R
    Raman Varabets <roman.vorobets@gmail.com>
  17. T
    tzm <frank@boldsolutions.de>
  18. M
    Mathieu Baudet <mathieubaudet@fb.com>
  19. O
    Oleksiy Golovko <alexei.golovko@gmail.com>
  20. R
    Rauan Mayemir <rauan@mayemir.io>
  21. C
    Carmelo Piccione <cep1@solvuu.com>
  22. J
    John Billings <john@monkeynut.org>
  23. L
    Louis Roché <louis@louisroche.net>
  24. B
    Brendan Long <self@brendanlong.com>
  25. C
    Chris Yocum <cyocum@gmail.com>
  26. L
    Louis Roché (Ahrefs) <louis.roche@ahrefs.com>
  27. L
    Louis Roché <louis.roche@ahrefs.com>
  28. P
    Pavel Antoshkin <pavel.antoshkin@ahrefs.com>
  29. P
    Pierre Boutillier <pierre.boutillier@laposte.net>
  30. S
    Shon Feder <shon.feder@key.me>
  31. A
    Anurag Soni <anuragsoni.13@gmail.com>
  32. A
    Arjun Ravi Narayan <arjunravinarayan@gmail.com>
  33. A
    Asya-kawai <kawai-toshiki@aintek.xyz>
  34. C
    Christophe Troestler <christophe.Troestler@umons.ac.be>
  35. Damien Doligez
  36. D
    Daniel M <dan.mntg@gmail.com>
  37. D
    Ding Xiang Fei <dingxiangfei2009@protonmail.ch>
  38. F
    François Pottier <francois.pottier@inria.fr>
  39. J
    Javier Chavarri <javier.chavarri@gmail.com>
  40. K
    Kate <kit.ty.kate@disroot.org>
  41. L
    Louis <louis.roche@ahrefs.com>
  42. L
    Louis Roché <louis@cryptosense.com>
  43. R
    Raman Varabets <raman+git@ahrefs.com>
  44. S
    Stephane Legrand <slegrand45@gmail.com>
  45. V
    Vincent Bernardoff <vb@luminar.eu.org>
  46. H
    haoyang <haoyang@esper.co>
  47. P
    pmundkur <prashanth.mundkur@gmail.com>
  48. Y
    ygrek <ygrek@autistici.org>

Maintainers

Sources

atd-2.14.1.tbz
sha256=84d15eefa1b0c23823484eaadc984b58063de74d42004c5a44795da94597c4cb
sha512=ba03e00dc34666a06f0fe798d5c145a0ebe619c823f88c50a0e7963e12d13f7041baf3a03544be882f473daf3b0bf6238ef42fb5e83ba504dda2b7e41fb8bc36

doc/atd/Atd/Json/index.html

Module Atd.JsonSource

Mapping from ATD to JSON

Sourcetype ocaml_adapter = {
  1. normalize : string;
  2. restore : string;
}
Sourcetype json_adapter = {
  1. ocaml_adapter : ocaml_adapter option;
    (*

    A module implementing normalize and restore.

    *)
  2. java_adapter : string option;
    (*

    tbd

    *)
}

Association between languages and json adapter for that language. The specification of each json adapter is language-specific.

Sourceval no_adapter : json_adapter
Sourcetype json_int =
  1. | Int
  2. | String
Sourcetype json_float =
  1. | Float of int option
  2. | Int
Sourcetype json_list =
  1. | Array
  2. | Object
Sourcetype json_variant = {
  1. json_cons : string;
}
Sourcetype json_field = {
  1. json_fname : string;
  2. json_unwrapped : bool;
}
Sourcetype json_record = {
  1. json_keep_nulls : bool;
  2. json_record_adapter : json_adapter;
}
Sourcetype json_sum = {
  1. json_sum_adapter : json_adapter;
  2. json_open_enum : bool;
}
Sourcetype json_repr =
  1. | Abstract
  2. | Bool
  3. | Cell
  4. | Def
  5. | External
  6. | Field of json_field
  7. | Float of json_float
  8. | Int of json_int
  9. | List of json_list
  10. | Nullable
  11. | Option
  12. | Record of json_record
  13. | String
  14. | Sum of json_sum
  15. | Tuple
  16. | Unit
  17. | Variant of json_variant
  18. | Wrap

The different kinds of ATD nodes with their json-specific options.

Sourceval annot_schema_json : Annot.schema
Sourceval get_json_list : Annot.t -> json_list
Sourceval is_json_map : Ast.type_expr -> bool
Sourceval get_json_float : Annot.t -> json_float
Sourceval get_json_int : Annot.t -> json_int
Sourceval get_json_cons : string -> Annot.t -> string
Sourceval get_json_fname : string -> Annot.t -> string
Sourceval get_json_record : Annot.t -> json_record
Sourceval get_json_sum : Annot.t -> json_sum
OCaml

Innovation. Community. Security.