Created
April 17, 2014 10:10
-
-
Save raphink/10970910 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Sssd = | |
let entry = Build.key_value_line Rx.word Sep.space_equal (store Rx.word) | |
let rec subsection = [ Util.del_str "/" . key Rx.word | |
. ( subsection | |
| Util.del_str "]" . Util.eol . entry*) | |
] | |
let section = [ Util.del_str "[" . key Rx.word | |
. ( subsection | |
| Util.del_str "]" . Util.eol . entry*) | |
] | |
let lns = (section | Util.empty | Util.comment)* | |
test lns get | |
" | |
[sssd] | |
key = value | |
[domain/LDAP] | |
key = value | |
[domain/AD/BC] | |
key = value\n" = | |
{ "sssd" { "key" = "value" } } | |
{ "domain" { "LDAP" { "key" = "value" } } } | |
{ "domain" { "AD" { "key" = "value" } } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment