Ignore:
Timestamp:
Jun 6, 2017, 6:20:55 PM (2 years ago)
Author:
cameron
Message:

Restore check-ins from the last several days

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/re/re_assertion.h

    r5308 r5493  
    2828    void setAsserted(RE * r) {mAsserted = r;}
    2929
     30    static Assertion::Kind reverseKind(Assertion::Kind k);
     31    static Assertion::Sense negateSense(Assertion::Sense s);
    3032
    3133protected:
     
    3941    Sense mSense;
    4042};
     43
     44inline Assertion::Kind Assertion::reverseKind(Assertion::Kind k) {
     45    if (k == Assertion::Kind::Boundary) return k;
     46    return k == Assertion::Kind::Lookahead ? Assertion::Kind::Lookbehind : Assertion::Kind::Lookahead;
     47}
     48
     49inline Assertion::Sense Assertion::negateSense(Assertion::Sense s) {
     50    return s == Assertion::Sense::Positive ? Assertion::Sense::Negative : Assertion::Sense::Positive;
     51}
    4152
    4253inline Assertion * makeAssertion(RE * asserted, Assertion::Kind k, Assertion::Sense s) {
Note: See TracChangeset for help on using the changeset viewer.