Ignore:
Timestamp:
Oct 2, 2018, 10:46:20 AM (9 months ago)
Author:
cameron
Message:

RE Transformation names and printing

File:
1 edited

Legend:

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

    r6160 r6170  
    88#define RE_UTILITY_H
    99
    10 namespace re { class RE; }
    11 namespace re { class Name; class Start; class End; class CC; class Seq; class Alt;
    12                class Rep; class Intersect; class Diff; class Range; class Group;
    13                class Assertion;
    14 }
     10namespace re { class RE; class Name;}
    1511
    1612namespace re {
     
    2723RE * makeUnicodeBreak();
    2824
    29 void UndefinedNameError (const Name * n);
    30 
    31 enum class NameTransformationMode {None, TransformDefinition};
    32 
    33 class RE_Transformer {
    34 public:
    35     RE_Transformer(NameTransformationMode m = NameTransformationMode::None) : mNameTransform(m) {}
    36     RE * transform(RE * r);
    37     virtual RE * transformName(Name * n);
    38     virtual RE * transformStart(Start * s);
    39     virtual RE * transformEnd(End * e);
    40     virtual RE * transformCC(CC * cc);
    41     virtual RE * transformSeq(Seq * s);
    42     virtual RE * transformAlt(Alt * a);
    43     virtual RE * transformRep(Rep * rep);
    44     virtual RE * transformIntersect(Intersect * e);
    45     virtual RE * transformDiff(Diff * d);
    46     virtual RE * transformRange(Range * rg);
    47     virtual RE * transformGroup(Group * g);
    48     virtual RE * transformAssertion(Assertion * a);
    49 protected:
    50     NameTransformationMode mNameTransform;
    51 };
    52 
    5325}
    5426#endif // RE_UTILITY_H
Note: See TracChangeset for help on using the changeset viewer.