Aptsources

Parsing /etc/apt/sources.list

Utility variables/functions

sep_ws

let sep_ws = del /[ \t]+/ " "

eol

let eol = Util.del_str "\n"

comment

let comment = Util.comment

empty

let empty = Util.empty

word

let word = /[^# \n\t]+/

Keywords

record

let record = [ Util.indent . seq "source" . [ label "type" . store word ] . sep_ws . [ label "uri" . store word ] . sep_ws . [ label "distribution" . store word ] . [ label "component" . sep_ws . store word ]* . del /[ \t]*(#.*)?/ "" . eol ]

Lens

lns

let lns = ( comment | empty | record ) *

filter

let sep_ws = del /[ \t]+/ " "
let eol = Util.del_str "\n"
let comment = Util.comment
let empty = Util.empty
let word = /[^# \n\t]+/
let record = [ Util.indent . seq "source" . [ label "type" . store word ] . sep_ws . [ label "uri" . store word ] . sep_ws . [ label "distribution" . store word ] . [ label "component" . sep_ws . store word ]* . del /[ \t]*(#.*)?/ "" . eol ]
let lns = ( comment | empty | record ) *
Close