tori-rs/ocaml
2025-05-05 02:06:37 -03:00
..
bin OCaml: Apply formatting 2025-04-19 19:09:16 -03:00
lib OCaml: Refactor configuration lexer for readability, conciseness 2025-05-05 02:06:37 -03:00
test OCaml: Update cram test spec version, add some reference implementations 2025-04-27 04:47:29 -03:00
.gitignore Scaffold OCaml project 2025-03-31 10:09:43 -03:00
.justfile OCaml: Minor justfile tweaks to make LSP happy 2025-05-04 01:16:40 -03:00
.ocamlformat OCaml: Apply formatting 2025-04-19 19:09:16 -03:00
.ocamlformat-ignore OCaml: Apply formatting 2025-04-19 19:09:16 -03:00
dune-project OCaml: Do not specify Dune version in dune-project 2025-04-15 20:57:21 -03:00
dune-workspace Implement most of the spec reusing scribe & nefthera code 2025-04-09 01:59:32 -03:00
README.md OCaml: Add a README with a configuration grammar 2025-05-04 01:16:58 -03:00
TODO.md README, TODO: Minor updates 2025-04-30 19:45:39 -03:00
tori.opam OCaml: Do not specify Dune version in dune-project 2025-04-15 20:57:21 -03:00

Configuration parser

Grammar:

assignment  = { space }, key, { space }, equal, { space }, value, "\n"
space       = " " | "\t"
key         = letter, { letter | digit | "_" }
equal       = "="
valuable    = ( letter | digit | "_" | "-" | "~" | "/" ), { valuable }
value       = valuable, { " " | valuable }

Written using the ISO 14977 EBNF Notation https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf. In this grammar, digit implies decimal digit.

See also: - Comparison of BNF notations: https://www.cs.man.ac.uk/~pjj/bnf/ebnf.html - W3C ABNF Notation: https://www.w3.org/Notation.html - IETF RFC 5234 ABNF Notation (replaces 4234, 2234): https://www.rfc-editor.org/rfc/rfc5234