Ignore:
Timestamp:
Apr 17, 2014, 6:20:11 PM (5 years ago)
Author:
cameron
Message:

Update for SparseCharSet?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/RE/Haskell/RunPablo.hs

    r3599 r3826  
    55
    66import Data.Bits
     7import Data.Char
     8import SparseCharSet
    79
    810data PabloE = All(Int) | Var(String) | And(PabloE, PabloE) | Or(PabloE, PabloE) | Not(PabloE)
    9               | CharClass(String) | Advance(PabloE) | MatchStar(PabloE, PabloE)
     11              | CharClass(SparseCharClass) | Advance(PabloE) | MatchStar(PabloE, PabloE)
    1012   deriving Show
    1113
     
    8284computeCC_helper(cc, [], powerOf2) = 0
    8385computeCC_helper(cc, c:cs, powerOf2)
    84    | elem c cc = powerOf2 + computeCC_helper(cc, cs, (powerOf2 * 2))
    85    | otherwise = computeCC_helper(cc, cs, (powerOf2 * 2))
     86   | elemCC(ord c, cc)  = powerOf2 + computeCC_helper(cc, cs, (powerOf2 * 2))
     87   | otherwise       = computeCC_helper(cc, cs, (powerOf2 * 2))
    8688
    8789------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.