Parses META files
`BaseDef refers to META definitions using the "=" operator,
`Appendix refers to definitions using the "+=" operator.
|: string||;||(*||The name of the defined variable||*)|
|: flavour||;||(*||The flavour of the definition||*)|
|: formal_pred list||;||(*||The formal predicates of the def||*)|
|: string||;||(*||The value assigned to the variable||*)|
pkg_definition is expressed by the syntax
var(p1,p2,...) = "value"
(flavour `BaseDef), or the syntax
var(p1,p2,...) += "value"
(flavour `Appendix) in the META file. The list of predicates may be omitted. Predicates may be negated by using "-", e.g. "-x".
scans and parses the file connected with channel
ch. The file must
have a syntax compatible with the META format. The return value
contains the found definitions for the package and all subpackages.
exception Stream.Error of string: is
raised on syntax errors. The string explains the error.
lookup variable_name predicate_list def:
Returns the value of
def under the assumption
that the predicates in
predicate_list hold, but no other predicates.
The rules are as follows: In the step (A), only the
definitions are considered. The first base definition is determined where
all predicates are satisfied and that has the longest predicate list.
In the step (B) only the
`Appendix definitions are considered.
All definitions are determined where all predicates are satisfied.
The final result is the concatenation of the single result of (A)
and all results of (B) (in the order they are defined). A space
character is inserted between two concatenated strings.
When step (A) does not find any matching definition, the exception
Not_found is raised.