[gforth] / gforth / regexp.fs  

gforth: gforth/regexp.fs

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

version 1.4, Sat Feb 4 22:09:11 2006 UTC version 1.5, Sat Feb 25 14:01:18 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 81 
Line 79 
 : ,=" ( 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.4  
changed lines
  Added in v.1.5

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help