tori-rs/ocaml
2025-05-05 10:57:04 -03:00
..
bin OCaml: Apply formatting 2025-04-19 19:09:16 -03:00
lib OCaml: Trim leading and trailing whitespace before lexing configuration 2025-05-05 10:57:04 -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: Trim leading and trailing whitespace before lexing configuration 2025-05-05 10:57:04 -03:00
tori.opam OCaml: Do not specify Dune version in dune-project 2025-04-15 20:57:21 -03:00

iganaq OCaml

This is the OCaml implementation of the iganaq prototype. See the root README for the general description.

Configuration parser

Grammar v0.2:

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

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

Spaces between the key and the = operator are lexed but meaningless. Spaces between the = operator and the first non-space character of the value are lexed and considered as part of the value. Spaces before the key and between the value and the newline are not lexed.

  • Note: non-terminals key and value are ambiguous.
    • Resolved by specifying what character terminates each

See also:

Task list

Notes

  1. INS = Iganaq Napkin Spec: https://brew.bsd.cafe/tori/iganaq#specification
  2. INS v0 B2.5 "MUST NOT run any system commands" is only testable if we wrap command execution properly in e.g. a list containing all executed commands and ensure no command is ever executed without being appended to it
  3. INS v0 A3.4 "running 'true' with exit code 0" requires the user to input their password every time. This should be dropped from the spec instead
  4. INS v0.1 changes requirement B2.3 to "MUST print the OS name and MUST log contents of /etc/os-release" in order to make the logging function testable without user input
  5. As per item 3 above, INS v0.2 drops "run 'true' with exit code 0" from A3.4