[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] [BUG] FEATURE PLANS: selection by ID

From: Tom Lord
Subject: [Gnu-arch-users] [BUG] FEATURE PLANS: selection by ID
Date: Mon, 24 May 2004 16:56:33 -0700 (PDT)

The little language for expressing tree selections was introduced in
the last message.  This message extends it, slighly.

We've seen rules of the form:

        (<outcome> <location>)

where if the <location> matches or matches a prefix of the location of
the item being tested, then the <outcome> specifies the result
produced by this rule.

So far, we've written all rule patterns just as strings, specifying a

        (b "./include/X11/x.h")

Such rules can be written using a list path fragments instead of a
single string:

        (b ("./include" "X11" "x.h"))


        (b ("./include/X11" "x.h"))


Any string in a rule pattern can be replaced with a list of the form:

        (id STRING)

Before a set of rules is evaluated for a given tree, all "(id STRING)" 
elements in patterns are replaced by suitably pruned paths.

For example, suppose that we have the rule:

        (b ("./include" (id "i_x_header_file")))

Suppose that in the tree we're looking at, the file with the id
"i_x_header_file" is at the path:  "./include/X11/basic/x.h".
Then the rule is rewritten:

        (b ("./include" "X11/basic/x.h"))

and is therefore equivalent to:

        (b "./include/X11/basic/x.h)

If a rule references an inventory id that doesn't exist, the rule is
simply discarded -- it matches nothing.



Like my work on GNU arch, Pika Scheme, and other technical contributions 
to the public sphere?   Show your support!


address@hidden for payments.


        The cause of death is birth.
                        -- George Harrison

reply via email to

[Prev in Thread] Current Thread [Next in Thread]