Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-01 08:52:28

0001 /*
0002  * $Id$
0003  *
0004  * $Log$
0005  * Revision 1.1  1996/03/08 15:32:59  mclareni
0006  * Initial revision
0007  *
0008  */
0009 /* kmacro.h: KUIP macros */
0010 
0011 typedef enum {
0012   APPLICATION_Statement,
0013   ASSIGNMENT_Statement,
0014   BREAKL_Statement,
0015   CASE_Label,
0016   CASE_Statement,
0017   COMMAND_Statement,
0018   DO_Statement,
0019   ELSE_Statement,
0020   ELSEIF_Statement,
0021   ENDCASE_Statement,
0022   ENDDO_Statement,
0023   ENDFOR_Statement,
0024   ENDIF_Statement,
0025   ENDWHILE_Statement,
0026   EOF_REACHED,
0027   EXITM_Statement,
0028   FOR_Statement,
0029   GOTO_Label,
0030   GOTO_Statement,
0031   IF_GOTO_Statement,
0032   IF_THEN_Statement,
0033   MACRO_Statement,
0034   NEXTL_Statement,
0035   OFF_ERROR_Statement,
0036   ON_ERROR_Statement,
0037   ON_ERROR_CONTINUE,
0038   ON_ERROR_EXITM,
0039   ON_ERROR_GOTO,
0040   ON_ERROR_STOPM,
0041   READ_Statement,
0042   REPEAT_Statement,
0043   RETURN_Statement,
0044   SHIFT_Statement,
0045   STOPM_Statement,
0046   UNTIL_Statement,
0047   WHILE_Statement,
0048   SYNTAX_ERROR
0049 } KumacStatement;
0050 
0051 typedef struct _KumacCode {
0052   int         (*op)();
0053   char         *arg[2];
0054 } KumacCode;
0055 
0056 typedef struct _KumacMacro {
0057   char         *name;
0058   struct _KumacMacro *next;
0059   int          ncode;
0060   KumacCode    *code;
0061 } KumacMacro;
0062 
0063 typedef struct _KumacFile {
0064   char        *path;
0065   int          stamp;
0066   KumacMacro  *macros;
0067 } KumacFile;
0068 
0069 typedef struct _ExecStack {
0070   KumacFile     *file;
0071   KumacMacro    *macro;
0072   char          *argline;
0073   char          *line_number;
0074   char          *source_line;
0075   HashTable     *variables;
0076   KumacStatement on_error_stmt;
0077   char          *on_error_arg;
0078   KumacStatement off_error_stmt;
0079   char          *off_error_arg;
0080   int            pc;
0081   int            status;
0082 } ExecStack;
0083 
0084 typedef struct _NestStack {
0085   KumacStatement stmt;
0086   char          *var;
0087   char           tmp1[16];
0088   char           tmp2[16];
0089   char           label1[16];
0090   char           label2[16];
0091   char           label3[16];
0092 } NestStack;
0093 
0094 extern void store_variable( ExecStack*, const char* name, const char* value );
0095