Help needed: Usage of --re-interval 
Author Message
 Help needed: Usage of --re-interval

Followup to my own message:  I have found that "--re-interval" does
not seem to enable intervals, as it should.  "--posix", however,
*DOES* enable intervals, although it also turns off the GNU extensions
like "\w" for "[:alnum:]".  Following are four versions of my original
"over8.awk" program, and the various results running them with and
without "--posix" and "--re-interval" under Win95/DJGPP.  The
"over8.dat" file is the same as previously posted.

The results, though these are not exhaustive tests, seem to indicate
(not prove) that "\w" may not be working properly, and that
"--re-interval" may not be working at all (see over8.a01 and over8.awk
results, especially over8.awk, with "--re-interval" vs. with
"--posix").

I have enough to keep programming, for now.  I'll just have to get
used to "--posix" mode.  I would be *very* interested if anyone else
can duplicate and/or expand on my results, though.

Peter

============ over8.a00 ====================
NF == 0 {next}
/[\w][\w\-][\w\-][\w\-][\w\-][\w\-][\w\-][\w\-][\w\-]+\./ {
    print "Found pat 1:" $0
    next

Quote:
}

/\.[\w\-][\w\-][\w\-][\w\-]+/ {
    print "Found pat 2:" $0
    next
Quote:
}

/[[:alnum:]]+\.[[:alnum:]]+/ {
    print "Found pat 3:" $0
    next

Quote:
}

============ over8.a01 ====================
NF == 0 {next}
/[[:alpha:]][[:alnum:]\-]{8,}[\.]/ {
    print "Found pat 1:" $0
    next
Quote:
}

/[\.][[:alnum:]\-]{4,}/ {
    print "Found pat 2:" $0
    next
Quote:
}

/[[:alpha:]][[:alnum:]\-]*[\.][[:alnum:]\-]+/ {
    print "Found pat 3:" $0
    next
Quote:
}

{next}

============ over8.a02 ====================
NF == 0 {next}
/[[:alpha:]][\w\-]{8,}[\.]/ {
    print "Found pat 1:" $0
    next

Quote:
}

/[\.][\w\-]{4,}/ {
    print "Found pat 2:" $0
    next
Quote:
}

/[[:alpha:]][\w\-]*[\.][\w\-]+/ {
    print "Found pat 3:" $0
    next
Quote:
}

{next}

============ over8.awk ====================
NF == 0 {next}
/[A-Za-z_]([A-Za-z0-9_\-]){8,}[\.]/ {
    print "Found pat 1:" $0
    next

Quote:
}

/[\.]([A-Za-z0-9_\-]){4,}/ {
    print "Found pat 2:" $0
    next
Quote:
}

/[A-Za-z_][A-Za-z0-9_\-]*[\.][A-Za-z0-9_\-]+/ {
    print "Found pat 3:" $0
    next
Quote:
}

{next}

============ command line results =========
H:\GNU\gcc-2721>gawk --re-interval -f over8.a00 over8.dat
Found pat 3:configure.h
Found pat 3:insn-emit.c
Found pat 3:go32.h

H:\GNU\gcc-2721>gawk --re-interval -f over8.a01 over8.dat
Found pat 3:configure.h
Found pat 3:insn-emit.c
Found pat 3:go32.h

H:\GNU\gcc-2721>gawk --re-interval -f over8.a02 over8.dat

H:\GNU\gcc-2721>gawk --re-interval -f over8.awk over8.dat
Found pat 3:configure.h
Found pat 3:insn-emit.c
Found pat 3:go32.h

H:\GNU\gcc-2721>gawk --posix -f over8.a00 over8.dat
Found pat 3:configure.h
Found pat 3:insn-emit.c
Found pat 3:go32.h

H:\GNU\gcc-2721>gawk --posix -f over8.a01 over8.dat
Found pat 1:configure.h
Found pat 1:insn-emit.c
Found pat 3:go32.h
Found pat 2:g++.make-distclean

H:\GNU\gcc-2721>gawk --posix -f over8.a02 over8.dat

H:\GNU\gcc-2721>gawk --posix -f over8.awk over8.dat
Found pat 1:configure.h
Found pat 1:insn-emit.c
Found pat 3:go32.h
Found pat 2:g++.make-distclean

H:\GNU\gcc-2721>


Quote:
>I have tried to properly use the '--re-interval' commandline switch
>and language feature, but I must be dong something wrong, because I
>cannot get the feature to work.  I have pasted in the (brief) awk
>program, data file and command line results under bash (Win95/DJGPP)
>below.  TIA for any help or info you can provide to me.

>The basic problem is to find filenames in a makefile that exceed the
>MSDOS 8.3 format and convert them to that 8.3 format.

>Here is the awk program I have been trying to use as a starting point
>(I fully expect to flesh it out much more later).  My question is, why
>does pattern 3 (which does NOT use intervals) work, but not pattern 1
>or 2 (which both DO use intervals)?

>============ over8.awk ====================
>NF == 0 {next}
>/[[:alpha:]][[:alnum:]\-]{8,}[\.]/ {
>    print "Found pat 1:" $0
>    next
>}
>/[\.][[:alnum:]\-]{4,}/ {
>    print "Found pat 2:" $0
>    next
>}
>/[[:alpha:]][[:alnum:]\-]*[\.][[:alnum:]\-]+/ {
>    print "Found pat 3:" $0
>    next
>}
>{next}
>===========================================

>This is the data file:

>============ over8.dat ====================
>configure.h
>insn-emit.c
>go32.h
>g++.make-distclean
>===========================================

>This is what happens when I run the program:

>============ command line results =========
>H:\GNU\gcc-2721>gawk --re-interval -f over8.awk over8.dat
>Found pat 3:configure.h
>Found pat 3:insn-emit.c
>Found pat 3:go32.h

>H:\GNU\gcc-2721>
>===========================================

----------------------------------------------------



Wed, 16 Feb 2000 03:00:00 GMT  
 Help needed: Usage of --re-interval



Quote:
>Followup to my own message:  I have found that "--re-interval" does
>not seem to enable intervals, as it should.  "--posix", however,
>*DOES* enable intervals, although it also turns off the GNU extensions
>like "\w" for "[:alnum:]".  Following are four versions of my original
>"over8.awk" program, and the various results running them with and
>without "--posix" and "--re-interval" under Win95/DJGPP.  The
>"over8.dat" file is the same as previously posted.

I remember running to this same glitch - and finding like you did that
--posix worked.  But I think the real solution is to upgrade your GAWK.

I reported this problem to Arnold Robbins and it is fixed in GAWK 3.0.3
(I just tested it there now)  I, too, had found that --posix was overkill -
that it was a drug with whose side-effects I could not live.

************************************************************************
La plus belle fille du monde ne peut
donner que tout ce qu'elle a.


          hundreds, if not thousands, of dollars, every time he posts -
************************************************************************
rwvpf wpnrrj ibf ijrfer



Thu, 17 Feb 2000 03:00:00 GMT  
 Help needed: Usage of --re-interval

<Snipped>

Quote:
>I remember running to this same glitch - and finding like you did that
>--posix worked.  But I think the real solution is to upgrade your GAWK.

>I reported this problem to Arnold Robbins and it is fixed in GAWK 3.0.3
>(I just tested it there now)  I, too, had found that --posix was overkill -
>that it was a drug with whose side-effects I could not live.

Thank you, Jeremy.  That was, indeed, the problem.  I was using the
V3.0 binary, which had the bug.  I had, in fact, gotten the V3.03
binary some time ago, but just forgot to install it.  All is now well
with just --re-interval.

Milli grazi, merci beaucoup, muchas gracias -- oh, and BTW thank you
very much <g>.

----------------------------------------------------



Thu, 17 Feb 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. 12TET Musical 3-Interval-String/6-Interval Cell/Set Non-Redundancy Permutation Ordering Problem:

2. Need Help on this usage.

3. Need help: REXXLIB ARRAYDELETE() usage

4. Need help on Verilog usage

5. Usage of if statements - Need help!!

6. Help on interval arithmetics package for lisp

7. ***HELP***HELP***NEED INFORMATION***HELP***HELP

8. Need some advices about Memory Usage

9. Changes needed for usage of Tk with games.

10. Bezier curve usage needed

11. Help: STExpress hangs with 100% CPU usage

12. OCX usage (HELP!!!!)

 

 
Powered by phpBB® Forum Software