about summary refs log tree commit diff stats
path: root/fff.scm
diff options
context:
space:
mode:
Diffstat (limited to 'fff.scm')
-rwxr-xr-x[-rw-r--r--]fff.scm42
1 files changed, 40 insertions, 2 deletions
diff --git a/fff.scm b/fff.scm index 6e524ad..e4409e8 100644..100755 --- a/fff.scm +++ b/fff.scm
@@ -1,5 +1,43 @@
1(use-modules (ice-9 peg) 1#!/bin/sh
2 (ice-9 match)) 2#| -*- scheme -*-
3exec guile -e main -s "$0" "$@"
4
5Flat Fuck Format
6--- a new configuration format, because who doesn't need that?
7
8Copyright (C) 2023 Case Duckworth <acdw@acdw.net>
9
10Everyone is permitted to do whatever with this software, without
11limitation. This software comes without any warranty whatsoever,
12but with two pieces of advice:
13
14- Don't hurt yourself.
15- Make good choices.
16
17Commentary:
18
19This script will convert files defined in the Flat Fuck Format (fff) into json.
20It will not convert anything back to fff. fff is explicitly made to be as
21simple as possible, and exclusively human-written. If a machine writes your
22configuration, ... use a better configuration format. Or make your program
23scriptable!
24
25FLAT FUCK FORMAT : Specification
26|#
27!#
28
29(define-module (fff)
30 #:use-module (ice-9 peg)
31 #:use-module (ice-9 match)
32 #:use-module (srfi srfi-11)
33 #:version (0 1 0)
34 #:export (fff
35 fff?
36 fff/comments?
37 fff->scm))
38
39
40;;; PEG Grammar
3 41
4(define-peg-pattern fff all 42(define-peg-pattern fff all
5 (and (* (or WHITESPACE NEWLINE)) 43 (and (* (or WHITESPACE NEWLINE))