Sujet : Re: GNU Awk's types of regular expressions
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.awkDate : 30. Nov 2024, 12:41:52
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vietm2$1munm$1@dont-email.me>
References : 1 2
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
Coming back to this...
On 29.11.2024 05:13, Kaz Kylheku wrote:
[...]
It could also (in combination with this) be lazy. [...]
Yes. There's already something like "on-demand logic" there, where
in print > "a_file" the file won't be created or overwritten if
the statement doesn't get triggered, and subsequent calls won't
overwrite it. So it would indeed be not surprising if such a
mechanism is implemented. (But I haven't examined the awk code.)
Someone will undoubtedly chime in confirming or refuting these
hypotheses.
It would be pretty silly if these regex objects didn't cache a compiled
regex across multiple uses.
True. But, OTOH, in GNU Awk there's a couple functions that are
just passed through to other (external) library functions. If these
functions happen to support only an interface like match(re,str)
where match() supports no [thread-safe] static memory for "re"
the caller might have no choice. (Don't know how it's actually
implemented.)
Janis
[...]