00001 // Copyright (C) 2001, Compaq Computer Corporation 00002 // 00003 // This file is part of Vesta. 00004 // 00005 // Vesta is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU Lesser General Public 00007 // License as published by the Free Software Foundation; either 00008 // version 2.1 of the License, or (at your option) any later version. 00009 // 00010 // Vesta is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // Lesser General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public 00016 // License along with Vesta; if not, write to the Free Software 00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 00019 // File: Prim.H 00020 // Last Modified On Thu Feb 26 12:03:44 PST 1998 by yuanyu 00021 // Modified On Fri Jan 26 18:46:12 PST 1996 by horning 00022 00023 #ifndef Prim_H 00024 #define Prim_H 00025 00026 #include "ValExpr.H" 00027 00028 // Types for primitive operations: 00029 typedef Val PrimExecF(ArgList exprs, const Context& c); 00030 typedef PrimExecF* PrimExec; 00031 00032 typedef Val PrimOpF(Expr e1, Expr e2, const Context& c); 00033 typedef PrimOpF* PrimOp; 00034 00035 typedef Val PrimUnOpF(Expr e, const Context& c); 00036 typedef PrimUnOpF* PrimUnOp; 00037 00038 // Map from the textual name of a primitive to its C++ function: 00039 PrimExec LookupPrim(const Text& primid); 00040 00041 // Map from the textual name of an operator to its C++ function: 00042 PrimOp LookupOp(const Text& opid); 00043 00044 // Map from the textual name of a unary operator to its C++ function: 00045 PrimUnOp LookupUnOp(const Text& opid); 00046 00047 // Initialize the mapping tables: 00048 void PrimInit(); 00049 00050 #endif // Prim_H