3 Only valid for the following subset:
13 Author: Dimitar Dimitrov <mitkofr@yahoo.fr>
18 let dash = Util.del_str "-"
21 let val = store Rx.word
23 let empty = Util.empty
24 let comment = Util.comment_noindent
28 the imposed indent is 2 spaces
30 let indent = del /[ \t]+/ " "
32 let mval = [ label "@mval" . Util.del_str "|-" . eol
33 . [ label "@line" . indent . store Rx.space_in . eol ]+ ]
39 let _inherit = [ key "<<" . colon . space . Util.del_str "*" . val . eol ]
40 let inherit = indent . _inherit . (indent . comment)*
44 > { "repo" = "branch" }
46 let _repo = [ key Rx.word . colon . space . (val | mval) . eol ]
47 let repo = indent . _repo . (indent . comment)*
53 let anchor = Util.del_str "&" . val
62 let entry = [ key Rx.word . colon . (space . anchor)? . eol
64 . ((inherit . (repo+)?) | repo+)
67 (* View: top level sequence *)
68 let sequence = [ label "@sequence" . counter "sequence" . dash . repo+ ]
71 let header = [ label "@yaml" . Util.del_str "---"
72 . (Sep.space . store Rx.space_in)? . eol ]
78 let lns = ((empty|comment)* . header)? . (sequence | entry | comment | empty)*