scfg

OCaml library and executable to work with the scfg configuration file format
README

scfg is an OCaml executable and library to work with the scfg configuration file format.

Installation

scfg can be installed with opam:

opam install scfg

If you don't have opam, you can install it following the how to install opam guide.

If you can't or don't want to use opam, consult the opam file for build instructions.

Quickstart

Using the library to parse a scfg file and reprint nicely:

open Scfg

let config =
  match Parse.from_file "config.scfg" with
  | Ok config -> config
  | Error e -> begin
    Format.eprintf "error: %s@." e;
    exit 1
  end

let () =
  Format.printf "%a@." Pp.config config

The provided binary does exactly this. If you have the following config.scfg file:

   name "a"        "b b b" 'c' {


       child1       ""    "I'm léo"

                child2 'nono'
     }

Running the binary on it will reprint it trying to make the output pretty:

$ scfg config.scfg
name a "b b b" c {
  child1 "" "I'm léo"
  child2 nono
}

For more, have a look at the example folder, at the documentation or at the test suite.

About

Install
Sources
0.1.tar.gz
sha256=b68874c310174f4df3f8f2e13375dffe1738b40511f424bdc41b29b893762a79
sha512=edcd1f3653a7dd356f289a023756eb52681f2c4b08d347f5e7b668b8de42cc7c9d935dbf2a478babc1862f0a55cfbef614a758325d728cefa1bba004f1202cd5
Dependencies
odoc
with-doc
menhir
>= "20211230"
ocaml
>= "4.13"
dune
>= "2.8"
Reverse Dependencies