gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] regexps for namespace


From: Tom Lord
Subject: Re: [Gnu-arch-users] regexps for namespace
Date: Tue, 30 Mar 2004 08:05:02 -0800 (PST)


    Jean:
    >>> I finally found some time to start hacking namespace.(c|h) to
    >>> make it use regexps.

    Tom:
    >> Please don't. [.... keep the hand-built lexers for that ....]

    > I don't mind extending the old functions instead of using
    > regexps, [....]

    > Two more things :

    > -Is patch-0 a valid patch level ? (the current over_patch_level thinks 
    > it is)

Interesting.  No, that's a bug.

    > -Do you mind if I keep my third step unchanged, meaning I carry
    > on searching files which do their own namespace validation such
    > as inv-ids (which uses regexps btw) and make them use the
    > namespace.[ch] functions ?


I'm not sure quite whch functions you are talking about.

Are you talking just about moving some code from inv-ids.[ch] and
invent.[ch] (perhaps eliminating the redundant `filename_matches') or
something else?

Generally, I don't see anything that needs changed in those files
regarding namespace issues.   I'd rather _not_ just move some of the
code from those files because none of it should be used anywhere other
than those files.

And, yes, the inventory code does use regexps heavily.   _Most_ of
those uses are to match patterns that can be set in =tagging-method
so there is no choice.

`is_at_or_underneath_archdir' and `is_control_file' would be hard to
write "by hand".  They could be statically compiled but that would add
too much new code, data, and build-complexity for too little return.

You can see that `contains_illegal_character' is trivial enough that
that did get written by hand.

-t





reply via email to

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