9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] awk, big REs
@ 2011-07-15 13:05 Steve Simon
  2011-07-15 13:37 ` Charles Forsyth
  2011-07-15 16:28 ` erik quanstrom
  0 siblings, 2 replies; 3+ messages in thread
From: Steve Simon @ 2011-07-15 13:05 UTC (permalink / raw)
  To: 9fans

I am trying to run configure for a GNU project on plan9.

yes I know, but stay with me...

it mostly works but part of the configure script fails where it runs
awk over a header file and uses a rather sill RE to find all defines/undefines.

/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)// { print; }

For some reasone they don't like character class ranges, and if I
replaces the lists with ranges the RE works as I expect,

/^[\t ]*#[\t ]*(define|undef)[\t ]+[_a-zA-Z][_a-zA-Z0-9]*([\t (]|$)/ { print; }

I looked at the awk source and even upped MAXRE - though its
existing value of 512 looks fine to me.

anyone any ideas why awk might not match with an RE like this?

-Steve



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-15 16:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-15 13:05 [9fans] awk, big REs Steve Simon
2011-07-15 13:37 ` Charles Forsyth
2011-07-15 16:28 ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).