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

iparser_spec.hh

Go to the documentation of this file.
00001 /*
00002  *  File:       iparser_spec.hh
00003  *              $Id: iparser_spec.hh,v 1.7 2002/06/26 20:47:11 alec Exp $
00004  *
00005  *  Author:     Alec Panoviciu (alecu@email.com)
00006  *
00007  *  Comments:
00008  *
00009  *  Revision history:
00010  *
00011  *  $Log: iparser_spec.hh,v $
00012  *  Revision 1.7  2002/06/26 20:47:11  alec
00013  *  g++ 3.x happy
00014  *
00015  *  Revision 1.6  2002/06/13 11:37:54  alec
00016  *  added #line stuff
00017  *
00018  *  Revision 1.5  2002/05/10 07:15:10  alec
00019  *  parser parse tree ok
00020  *
00021  *  Revision 1.4  2002/05/08 18:18:41  alec
00022  *  *** empty log message ***
00023  *
00024  *  Revision 1.3  2002/04/29 09:34:10  alec
00025  *  scanner ptree building compiles
00026  *
00027  */
00028 
00029 
00030 /* 
00031   Copyright (C) 2002 Alexandru Panoviciu (alecu@email.com)
00032 
00033   This program is free software; you can redistribute it and/or modify
00034   it under the terms of the GNU General Public License as published by
00035   the Free Software Foundation; either version 2 of the License, or
00036   (at your option) any later version.
00037 
00038   This program is distributed in the hope that it will be useful,
00039   but WITHOUT ANY WARRANTY; without even the implied warranty of
00040   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00041   GNU General Public License for more details.
00042 
00043   You should have received a copy of the GNU General Public License
00044   along with this program; if not, write to the Free Software
00045   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00046 
00047  */
00048 
00049 #ifndef __IPARSER_SPEC_HH__
00050 #define __IPARSER_SPEC_HH__
00051 
00052 #include <string>
00053 #include <vector>
00054 using namespace std;
00055 
00056 
00057 #include "parse_util.hh"
00058 
00059 class IEbnfNodeBuilder;
00060 class EbnfNode;
00061 
00071 class IParserSpec
00072 {
00073 public:
00074 
00079   virtual IEbnfNodeBuilder& getEbnfNodeBuilder() = 0;
00080 
00100   virtual void addProduction (const string &name,
00101                               const string &retTypeName,
00102                               const Position &retTypePos,
00103                               const string &formalArgs,
00104                               const Position &formalArgsPos,
00105                               const string &exceptList,
00106                               const Position &exceptListPos,
00107                               const string &preambleCode,
00108                               const Position &preambleCodePos,
00109                               EbnfNode *expansion,
00110                               const Position &pos) throw (ParseException) = 0;
00111 
00117   virtual void setPreambleCode (const string &block, const Position &pos) = 0;
00118 
00122   virtual void setClassName (const string &className) = 0;
00123 
00127   virtual void setInheritance (const string &inheritance,
00128                                const Position &pos) = 0;
00129 
00135   virtual void addCodeBlock (const string &block, const Position &pos) = 0;
00136 
00137 #ifdef DEBUG
00138 
00142   virtual void dump (ostream &os) const = 0;
00143 #endif
00144 };
00145 
00146 #endif /* #ifndef __IPARSER_SPEC_HH__ */

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