Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

dfa_re_node_builder.hh

Go to the documentation of this file.
00001 /*
00002  *  File:       dfa_re_node_builder.hh
00003  *              $Id: dfa_re_node_builder.hh,v 1.2 2002/05/22 01:23:23 alec Exp $
00004  *
00005  *  Author:     Alec Panoviciu (alecu@email.com)
00006  *
00007  *  Comments:
00008  *
00009  *  Revision history:
00010  *
00011  *  $Log: dfa_re_node_builder.hh,v $
00012  *  Revision 1.2  2002/05/22 01:23:23  alec
00013  *  case sensitivity support
00014  *
00015  *  Revision 1.1  2002/04/29 09:40:01  alec
00016  *  *** empty log message ***
00017  *
00018  */
00019 
00020 
00021 /* 
00022   Copyright (C) 2002 Alexandru Panoviciu (alecu@email.com)
00023 
00024   This program is free software; you can redistribute it and/or modify
00025   it under the terms of the GNU General Public License as published by
00026   the Free Software Foundation; either version 2 of the License, or
00027   (at your option) any later version.
00028 
00029   This program is distributed in the hope that it will be useful,
00030   but WITHOUT ANY WARRANTY; without even the implied warranty of
00031   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00032   GNU General Public License for more details.
00033 
00034   You should have received a copy of the GNU General Public License
00035   along with this program; if not, write to the Free Software
00036   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 &registry_) : 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 &registry;
00094 
00098   bool caseSensitive;
00099 };
00100 
00101 #endif /* #ifndef __DFA_RE_NODE_BUILDER_HH__ */

Generated at Tue Jul 9 21:05:43 2002 for CppCC by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001