00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef __DFA_RE_NODE_BUILDER_HH__
00041 #define __DFA_RE_NODE_BUILDER_HH__
00042
00043 #include "ire_node_builder.hh"
00044
00045 class DfaSourceRe;
00046 class PropRegistry;
00047
00048
00049 class DfaReNodeBuilder : public IReNodeBuilder
00050 {
00051 public:
00052
00053 DfaReNodeBuilder (PropRegistry ®istry_) : registry(registry_)
00054 {}
00055
00056 virtual ReNode* createOrNode (ReNode *pre,
00057 ReNode *post, const Position &pos);
00058
00059 virtual ReNode* createCatNode (ReNode *pre, ReNode *post,
00060 const Position &pos);
00061
00062 virtual ReNode* createPlusNode (ReNode *in, const Position &pos);
00063
00064 virtual ReNode* createOptionalNode (ReNode *in, const Position &pos);
00065
00066 virtual ReNode* createStarNode (ReNode *in, const Position &pos);
00067
00068 virtual ReNode* createStringLiteralNode (const string& s,
00069 const Position &pos);
00070
00071 virtual ReNode* createCharListNode (bool negated,
00072 const vector<CharClassDescriptor> &chars,
00073 const Position &pos);
00074
00079 DfaSourceRe* createEotNode (int tokId, const Position &pos);
00080
00081 protected:
00082
00089 DfaSourceRe* createCharNode (unsigned char match, const Position &pos);
00090
00091 private:
00092
00093 PropRegistry ®istry;
00094
00098 bool caseSensitive;
00099 };
00100
00101 #endif