Changeset 3828


Ignore:
Timestamp:
Apr 18, 2014, 12:12:06 AM (4 years ago)
Author:
cameron
Message:

Bug fixes

File:
1 edited

Legend:

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

    r3826 r3828  
    179179
    180180parseCC_body1(a, [], ccSoFar) = (ParseFailure "Unclosed character class", [])
    181 parseCC_body1(a, ']':more, ccSoFar) = (ParseSuccess (CC (insert1(ord(']'), ccSoFar))), more)
     181parseCC_body1(a, ']':more, ccSoFar) = (ParseSuccess (CC (insert1(ord(a), ccSoFar))), more)
    182182parseCC_body1(a, [_], ccSoFar) = (ParseFailure "Unclosed character class", [])
    183183parseCC_body1(a, '-':']':more, ccSoFar) = (ParseSuccess (CC (insert1(ord(a), insert1(ord('-'), ccSoFar)))), more)
     
    193193
    194194negateCharClassResult(ParseSuccess (CC s), remaining) =
    195    (ParseSuccess (CC (negateClass s)), remaining)
     195-- should be the following, but there are issues
     196--   (ParseSuccess (CC (negateClass s)), remaining)
     197-- We use the following hack for ASCII for now
     198   (ParseSuccess (CC (negateClass (insert1(10, insertRange(128, 0x10FFFF, s))))), remaining)
    196199negateCharClassResult(failureResult, remaining) = (failureResult, remaining)
    197200
Note: See TracChangeset for help on using the changeset viewer.