1 /* 2 * Builder - builds a ZCode interpreter 3 * Copyright (C) 2000 Andrew Hunter 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 /* 21 * Representation of a ZCode operation 22 */ 23 24 #ifndef __OPERATION_H 25 #define __OPERATION_H 26 27 enum optype 28 { 29 zop, unop, binop, varop, extop 30 }; 31 32 typedef struct 33 { 34 int isbranch; 35 int isstore; 36 int isstring; 37 int islong; 38 int canjump; 39 int reallyvar; 40 41 int fixed_args; 42 } opflags; 43 44 typedef struct 45 { 46 char* name; 47 enum optype type; 48 int value; 49 opflags flags; 50 int versions; /* Bitfield */ 51 char* code; 52 int codeline; 53 } operation; 54 55 typedef struct oplist 56 { 57 int numops; 58 operation** op; 59 } oplist; 60 61 #endif 62 63 64