xref: /inferno-os/module/cfg.m (revision 46439007cf417cbd9ac8049bb4122c890097a0fa)
1Cfg : module {
2	PATH : con "/dis/lib/cfg.dis";
3
4	Attr : adt {
5		name : string;
6		value : string;
7	};
8
9	Tuple : adt {
10		lnum : int;
11		attrs : list of Attr;
12		lookup: fn (t : self ref Tuple, name : string) : string;
13	};
14
15	Record : adt {
16		tuples : list of ref Tuple;
17		lookup : fn (r : self ref Record, name : string) : (string, ref Tuple);
18	};
19
20	init : fn (path : string) : string;
21	reset:	fn();
22	lookup : fn (name : string) : list of (string, ref Record);
23	getkeys : fn () : list of string;
24	parseline:	fn(s: string, lno: int): (ref Tuple, string);
25};
26