[gforth] / gforth / regexp.fs  

gforth: gforth/regexp.fs

Diff for /gforth/regexp.fs between version 1.3 and 1.4

version 1.3, Sat Dec 31 15:46:10 2005 UTC version 1.4, Sat Feb 4 22:09:11 2006 UTC
Line 42 
Line 42 
 0 Value cur-class  0 Value cur-class
 : charclass ( -- )  Create here dup to cur-class $100 dup allot erase ;  : charclass ( -- )  Create here dup to cur-class $100 dup allot erase ;
 : +char ( char -- )  cur-class swap +bit ;  : +char ( char -- )  cur-class swap +bit ;
   : +ichar ( char -- )  dup toupper +char +char ;
 : -char ( char -- )  cur-class swap -bit ;  : -char ( char -- )  cur-class swap -bit ;
   : -ichar ( char -- )  dup toupper -char -char ;
 : ..char ( start end -- )  1+ swap ?DO  I +char  LOOP ;  : ..char ( start end -- )  1+ swap ?DO  I +char  LOOP ;
 : or! ( n addr -- )  dup @ rot or swap ! ;  : or! ( n addr -- )  dup @ rot or swap ! ;
 : and! ( n addr -- )  dup @ rot and swap ! ;  : and! ( n addr -- )  dup @ rot and swap ! ;
Line 79 
Line 81 
 : ,=" ( addr u -- ) tuck ]] dup SLiteral $= ?LEAVE Literal + noop [[ ;  : ,=" ( addr u -- ) tuck ]] dup SLiteral $= ?LEAVE Literal + noop [[ ;
 : =" ( <string>" -- )  '" parse ,=" ; immediate  : =" ( <string>" -- )  '" parse ,=" ; immediate
   
   [IFDEF] capscompare
   : $i= ( addr1 addr2 u -- f )  tuck capscompare ;
   : ,i=" ( addr u -- ) tuck ]] dup SLiteral $i= ?LEAVE Literal + noop [[ ;
   : i=" ( <string>" -- )  '" parse ,i=" ; immediate
   [ELSE]
   : i=" ( -- )  '" parse bounds ?DO
       ]] count toupper [[ I c@ toupper ]] Literal <> ?LEAVE [[
     LOOP ; immediate
   [THEN]
   
 \ loop stack  \ loop stack
   
 Variable loops  $40 3 * cells allot  Variable loops  $40 3 * cells allot


Generate output suitable for use with a patch program
Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help