crypttab.aug

USEFUL PRIMITIVES

Separators

sep_tab

let sep_tab = Sep.tab

comma

let comma = Sep.comma

Generic primitives

eol

let eol = Util.eol

comment

let comment = Util.comment

empty

let empty = Util.empty

word

let word = Rx.word

optval

let optval = /[A-Za-z0-9_.:-]+/

target

let target = Rx.device_name

fspath

let fspath = Rx.fspath

ENTRIES

comma_sep_list

let comma_sep_list (l:string) = let value = [ label "value" . Util.del_str "=" . store optval ] in let lns = [ label l . store word . value? ] in Build.opt_list lns comma

A comma separated list of options (opt=value or opt)

record

let record = [ seq "entry" . [ label "target" . store target ] . sep_tab . [ label "device" . store fspath ] . (sep_tab . [ label "password" . store fspath ] . ( sep_tab . comma_sep_list "opt")? )? . eol ]

A crypttab record

lns

let lns = ( empty | comment | record ) *

The crypttab lens

filter

let sep_tab = Sep.tab
let comma = Sep.comma
let eol = Util.eol
let comment = Util.comment
let empty = Util.empty
let word = Rx.word
let optval = /[A-Za-z0-9_.:-]+/
let target = Rx.device_name
let fspath = Rx.fspath
let comma_sep_list (l:string) = let value = [ label "value" . Util.del_str "=" . store optval ] in let lns = [ label l . store word . value? ] in Build.opt_list lns comma
A comma separated list of options (opt=value or opt)
let record = [ seq "entry" . [ label "target" . store target ] . sep_tab . [ label "device" . store fspath ] . (sep_tab . [ label "password" . store fspath ] . ( sep_tab . comma_sep_list "opt")? )? . eol ]
A crypttab record
let lns = ( empty | comment | record ) *
The crypttab lens
Close