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

iebnf_node_builder.hh

Go to the documentation of this file.
00001 /*
00002  *  File:       iebnf_node_builder.hh
00003  *              $Id: iebnf_node_builder.hh,v 1.8 2002/06/26 20:46:43 alec Exp $
00004  *
00005  *  Author:     Alec Panoviciu (alecu@email.com)
00006  *
00007  *  Comments:
00008  *
00009  *  Revision history:
00010  *
00011  *  $Log: iebnf_node_builder.hh,v $
00012  *  Revision 1.8  2002/06/26 20:46:43  alec
00013  *  g++ 3.x happy
00014  *
00015  *  Revision 1.7  2002/06/23 23:32:33  alec
00016  *  la-time usercode (force)
00017  *
00018  *  Revision 1.6  2002/06/13 11:37:40  alec
00019  *  added #line stuff
00020  *
00021  *  Revision 1.5  2002/05/16 21:36:26  alec
00022  *  parser generation done
00023  *
00024  *  Revision 1.4  2002/05/10 07:15:10  alec
00025  *  parser parse tree ok
00026  *
00027  *  Revision 1.3  2002/05/08 18:18:24  alec
00028  *  *** empty log message ***
00029  *
00030  *  Revision 1.2  2002/04/29 09:34:10  alec
00031  *  scanner ptree building compiles
00032  *
00033  */
00034 
00035 
00036 /* 
00037   Copyright (C) 2002 Alexandru Panoviciu (alecu@email.com)
00038 
00039   This program is free software; you can redistribute it and/or modify
00040   it under the terms of the GNU General Public License as published by
00041   the Free Software Foundation; either version 2 of the License, or
00042   (at your option) any later version.
00043 
00044   This program is distributed in the hope that it will be useful,
00045   but WITHOUT ANY WARRANTY; without even the implied warranty of
00046   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00047   GNU General Public License for more details.
00048 
00049   You should have received a copy of the GNU General Public License
00050   along with this program; if not, write to the Free Software
00051   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00052 
00053  */
00054 
00055 #ifndef __IEBNF_NODE_BUILDER_HH__
00056 #define __IEBNF_NODE_BUILDER_HH__
00057 
00058 #include <string>
00059 #include <vector>
00060 using namespace std;
00061 
00062 #include "parse_util.hh"
00063 
00064 class EbnfNode;
00065 class LaSpec;
00066 class CatchClause;
00067 
00077 class IEbnfNodeBuilder
00078 {
00079 public:
00080 
00081   virtual EbnfNode* createOrNode (EbnfNode *pre, EbnfNode *post,
00082                                   const Position &pos) = 0;
00083 
00084   virtual EbnfNode* createCatNode (EbnfNode *pre, EbnfNode *post,
00085                                    const Position &pos) = 0;
00086 
00087   virtual EbnfNode* createPlusNode (EbnfNode *in,
00088                                     const Position &pos) = 0;
00089 
00090   virtual EbnfNode* createStarNode (EbnfNode *in,
00091                                     const Position &pos) = 0;
00092 
00093   virtual EbnfNode* createOptionalNode (EbnfNode *in,
00094                                         const Position &pos) = 0;
00095 
00096   virtual EbnfNode* createNonterminalNode (const string &targetVar,
00097                                            const Position &targetVarPoa,
00098                                            const string &nontermId,
00099                                            const string &actualArgs,
00100                                            const Position &actualArgsPos,
00101                                            const Position &pos) = 0;
00102 
00103   virtual EbnfNode* createTerminalNode (const string &termId,
00104                                         const Position &pos)
00105     throw (ParseException) = 0;
00106 
00110   virtual LaSpec* createLaSpec (int fixedla, EbnfNode *synLa,
00111                                 const string &semLa,
00112                                 const Position &pos) = 0;
00113 
00118   virtual CatchClause* createCatchClause (const string &exceptionDecl,
00119                                           const Position &edPos,
00120                                           const string &code,
00121                                           const Position &edPos) = 0;
00122 
00123   virtual void setLookahead (EbnfNode* node, LaSpec* la) = 0;
00124 
00125   virtual void setStartCode (EbnfNode *node, const string &code, bool force,
00126                              const Position &pos) = 0;
00127 
00128   virtual void setEndCode (EbnfNode *node, const string &code, bool force,
00129                            const Position &pos) = 0;
00130 
00131   virtual void setCatchClauses (EbnfNode *node,
00132                                 vector<CatchClause> &catchList) = 0;
00133 
00134 };
00135 
00136 #endif /* #ifndef __IEBNF_NODE_BUILDER_HH__ */

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