cmd.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2008 Kamil Dudka <xdudka00@stud.fit.vutbr.cz>
00003  *
00004  * This file is part of vyp08 (compiler and interpreter of VYP08 language).
00005  *
00006  * vyp08 is free software: you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation, either version 3 of the License, or
00009  * any later version.
00010  *
00011  * vyp08 is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with vyp08.  If not, see <http://www.gnu.org/licenses/>.
00018  */
00019 
00020 #ifndef CMD_H
00021 #define CMD_H
00022 
00023 #include "config.h"
00024 #include "vm.h"
00025 
00030 class CmdFactory {
00031     public:
00032         typedef Value::VType VType;                                     
00033 
00035         CmdFactory(Vm *vm);
00036         ~CmdFactory();
00037 
00038         PCmd createAssign(Token, FncDefinition *, VType &dstType);      
00039         PCmd createIf(Token, PCmd ifCmd, PCmd elseCmd);                 
00040         PCmd createWhile(Token, PCmd whileExpr, PCmd whileStat);        
00041         PCmd createPush(Token, FncDefinition *, VType &dstType);        
00042         PCmd createUnary(Token);                                        
00043         PCmd createBinary(Token, VType t1, VType t2, VType &dstType);   
00044         PCmd createCall(Token, unsigned nArgs, bool pushResult);        
00045         PCmd createPrint(Token, EToken valType, VType &srcType);        
00046         PCmd createInput(Token, Value::VType type, bool pushResult);    
00047     private:
00048         struct Private;
00049         Private *d;
00050 };
00051 
00052 #endif /* CMD_H */
00053 

Generated on Sat Jul 4 18:32:59 2009 for vyp08 (compiler and interpreter of VYP08 language) by  doxygen 1.5.4