Hi,
Phil Edwards <[EMAIL PROTECTED]> writes:
> On Thu, Jul 24, 2003 at 02:44:12PM -0500, Raja R Harinath wrote:
>>
>> That's strange. It is implemented by a grep.
>>
>> foreach (split (/\W+/))
>> {
>> $prohibited{$_} = $.
>> if /$forbidden/o && !/$allowed/o && ! exists $prohibited{$_};
>> }
>
> Where is this code? On my system, /usr/bin/m4 is a binary, not a perl
> script. :-) I've been trying to dig to learn more, but haven't yet
> retrieved the m4 source.
In $bindir/autom4te. Somewhat misleadingly, 'm4_pattern_forbid'
isn't part of 'm4', but from the 'm4sugar' library that's part of
'autoconf'.
>> > Any other ideas? The few examples of m4_pattern_forbid I've seen all
>> > seem to be matching isolated words, e.g., m4_pattern_forbid([^FOO$]),
>> > which clearly won't help for trying to match part of a variable name.
>>
>> Given the splitting above on \W, that shouldn't be a problem.
>
> I've been trying variations on
>
> m4_pattern_forbid([\${?target_alias\>],
> [target alias is not what you think it is])
I don't know if that'll work, since the \W split will probably
swallow the ${.
- Hari
--
Raja R Harinath ------------------------------ [EMAIL PROTECTED]