Ignore:
Timestamp:
Jun 27, 2014, 2:04:04 AM (5 years ago)
Author:
cameron
Message:

Empty repetitions => Seq []

File:
1 edited

Legend:

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

    r3888 r3900  
    7171  |  otherwise            = h1 * h2
    7272
     73mkRep(Seq [], lb, ub) = Seq []
    7374mkRep(Rep(r, lb1, ub1), lb2, ub2)
    7475   | ub1 == unboundedRep && lb2 > 0    = Rep(r, lb1 * lb2, unboundedRep)
     
    7980   | otherwise = Rep(Rep(r, lb1, ub1), lb2, ub2)
    8081mkRep(r, lb, ub)
     82   | lb == 0 && ub == 0  = Seq []
    8183   | lb == 1 && ub == 1  = r
    8284   | otherwise           = Rep(r, lb, ub)
Note: See TracChangeset for help on using the changeset viewer.