package scfg

All checked builds pass
  1. Overview
  2. Docs
OCaml library and executable to work with the scfg configuration file format

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.5.tar.gz
sha256=930e04c7b16fcc81e203725324ea6ace6586080f53fb87ea24c0e163588c7614
sha512=753645f5c904d48dd67dceeca12408d8bb3d9ca80ae57e9600573cf2600031c2b661cfcd70331d48cb171ce445e4826e31304ec9796ba424932bba453096c6bb

Description

scfg is an OCaml library and executable to work with the scfg configuration file format. It provides a parser, a pretty printer and a module to perform queries.

README

scfg

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

Dependencies (9)

  1. sedlex
  2. prelude >= "0.5"
  3. ocaml >= "4.13"
  4. menhir >= "20211230"
  5. fpath
  6. fmt
  7. cmdliner >= "1.3.0"
  8. bos >= "0.2.1"
  9. dune >= "2.9"

Dev Dependencies (1)

  1. odoc with-doc

Optional Dependencies

None

Used by (1)

  1. smtml >= "0.7.0"

Conflicts

None

Build status

Results of building scfg with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.5 (this version) n/a good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure