package sexp
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >
  
  
On This Page
  
  
  S-expression swiss knife
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
  
    
      sexp-v0.16.0.tar.gz
    
    
        
    
  
  
  
    
  
        sha256=bde6acfd2814bcc38a0d3cacb42e513d8932595152dd9798419559fb0e026f4e
    
    
  Description
A suite of tools for working with s-expressions from the command line. It contains subcommands for pretty printing, querying, and modifying sexps, as well as some conversions to and from other formats.
Published: 14 Jun 2023
README
Sexp - The s-expression toolkit
A suite of tools for working with s-expressions from the command line. It contains subcommands for pretty printing, querying, and modifying sexps, as well as some conversions to and from other formats.
See also:
$ sexp -help
the s-expression toolkit
  sexp SUBCOMMAND
=== subcommands ===
  assemble        Assemble a lists of parts into sexps. Sexp part lists are
                  separated by newlines.
  change          transform an s-expression
  flatten         Flatten a list of sexp into its parts. Each part on its own
                  line.
  get             extract parts of an s-expression
  of-xml          convert XML from stdin into an s-expression
  pp              Pretty print S expressions in a human-friendly way.
  print           pretty-print an s-expression
  query           query an s-expression
  resolve-macros  resolve macros in a sexp
  restructure     recover structure of an s-expression
  select          Use CSS-style selectors to traverse sexp trees
  to-csv          converts a list of record s-expressions into CSV format
  validate        validate a sequence of s-expressions on stdin
  version         print version information
  help            explain a given subcommand (perhaps recursively)Examples
Colorize the output of ocamlc -dlambda:
$ ocamlc -dlambda -c fact.ml 2>&1 | sexp pp -color (setglobal Fact! ( letrec (fact/1008 ( function n/1009 ( if (== n/1009 0) 1 (* n/1009 (apply fact/1008 (- n/1009 1)))))) (makeblock 0 fact/1008)))
Extract the list of command run by jenga:
$ cat query.sexp
(pipe
  (variant Job_started 1)
  (index 1)
  (wrap (cat (field prog) (pipe (field args) each)))
)
$ sexp query -file query.sexp < .jenga/.jenga.debug
(ocamlc -c foo.mli)
(ocamlc -c foo.ml)
...Dependencies (16)
- 
  
    dune
  
  
    >= "2.0.0"
- 
  
    shell
  
  
    >= "v0.16" & < "v0.17"
- 
  
    sexplib
  
  
    >= "v0.16" & < "v0.17"
- 
  
    sexp_select
  
  
    >= "v0.16" & < "v0.17"
- 
  
    sexp_pretty
  
  
    >= "v0.16" & < "v0.17"
- 
  
    sexp_macro
  
  
    >= "v0.16" & < "v0.17"
- 
  
    sexp_diff
  
  
    >= "v0.16" & < "v0.17"
- 
  
    re2
  
  
    >= "v0.16" & < "v0.17"
- 
  
    ppx_jane
  
  
    >= "v0.16" & < "v0.17"
- 
  
    jsonaf
  
  
    >= "v0.16" & < "v0.17"
- 
  
    csvfields
  
  
    >= "v0.16" & < "v0.17"
- 
  
    core_unix
  
  
    >= "v0.16" & < "v0.17"
- 
  
    core_kernel
  
  
    >= "v0.16" & < "v0.17"
- 
  
    core
  
  
    >= "v0.16" & < "v0.17"
- 
  
    async
  
  
    >= "v0.16" & < "v0.17"
- 
  
    ocaml
  
  
    >= "4.14.0"
Dev Dependencies
None
Used by
None
Conflicts
None
 sectionYPositions = computeSectionYPositions($el), 10)"
  x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
  >
  
  
  On This Page