[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: word terminator
From: |
Aharon Robbins |
Subject: |
Re: word terminator |
Date: |
Thu, 12 Apr 2001 17:39:12 +0300 |
Greetings. Re this:
> From: Pit Kreiner <address@hidden>
> To: "'address@hidden'" <address@hidden>
> Cc: "'address@hidden'" <address@hidden>
> Subject: word terminator
> Date: Tue, 10 Apr 2001 10:15:21 +0200
>
> The word terminators \< and \> seem to have a problem with _.
> The following example shows what I mean:
>
> [ sample program and input omitted. ]
Thanks for the bug report. The following patch fixes the problem,
and is already included in the upcoming (RSN) 3.1 release.
Arnold
--------------------------------------------------------
*** ../gawk-3.0.6/dfa.c Fri May 2 04:36:18 1997
--- dfa.c Sun Dec 3 15:28:25 2000
***************
*** 1547,1552 ****
--- 1547,1553 ----
for (i = 0; i < NOTCHAR; ++i)
if (ISALNUM(i))
setbit(i, letters);
+ setbit('_', letters);
setbit('\n', newline);
}
***************
*** 1680,1686 ****
for (i = 0; i < NOTCHAR; ++i)
if (i == '\n')
trans[i] = state_newline;
! else if (ISALNUM(i))
trans[i] = state_letter;
else
trans[i] = state;
--- 1681,1687 ----
for (i = 0; i < NOTCHAR; ++i)
if (i == '\n')
trans[i] = state_newline;
! else if (ISALNUM(i) || i == '_')
trans[i] = state_letter;
else
trans[i] = state;
***************
*** 1741,1747 ****
if (c == '\n')
trans[c] = state_newline;
! else if (ISALNUM(c))
trans[c] = state_letter;
else if (c < NOTCHAR)
trans[c] = state;
--- 1742,1748 ----
if (c == '\n')
trans[c] = state_newline;
! else if (ISALNUM(c) || c == '_')
trans[c] = state_letter;
else if (c < NOTCHAR)
trans[c] = state;
***************
*** 1890,1896 ****
for (i = 0; i < NOTCHAR; ++i)
if (i == '\n')
sbit[i] = 4;
! else if (ISALNUM(i))
sbit[i] = 2;
else
sbit[i] = 1;
--- 1891,1897 ----
for (i = 0; i < NOTCHAR; ++i)
if (i == '\n')
sbit[i] = 4;
! else if (ISALNUM(i) || i == '_')
sbit[i] = 2;
else
sbit[i] = 1;
- word terminator, Pit Kreiner, 2001/04/10
- Re: word terminator,
Aharon Robbins <=