1 /* 2 char id_format[] = "@(#)format.h 1.6"; 3 * 4 * format parser definitions 5 */ 6 7 struct syl 8 { 9 short op,p1,p2,rpcnt; 10 }; 11 12 /* do NOT change this defines or add new ones without 13 * changing the value of the following define for OP_TYPE_TAB. 14 * change format.h both in the compiler and libI77 simultaneously. 15 */ 16 17 18 #define RET 1 19 #define REVERT 2 20 #define GOTO 3 21 #define X 4 22 #define SLASH 5 23 #define STACK 6 24 #define I 7 25 #define ED 8 26 #define NED 9 27 #define IM 10 28 #define APOS 11 29 #define H 12 30 #define TL 13 31 #define TR 14 32 #define T 15 33 #define COLON 16 34 #define S 17 35 #define SP 18 36 #define SS 19 37 #define P 20 38 #define BNZ 21 39 #define B 22 40 #define F 23 41 #define E 24 42 #define EE 25 43 #define D 26 44 #define DE 27 /*** NOT STANDARD FORTRAN ***/ 45 #define G 28 46 #define GE 29 47 #define L 30 48 #define A 31 49 #define AW 32 50 #define R 33 /*** NOT STANDARD FORTRAN ***/ 51 #define DOLAR 34 /*** NOT STANDARD FORTRAN ***/ 52 #define SU 35 /*** NOT STANDARD FORTRAN ***/ 53 54 #define LAST_TERM SU 55 56 /* OP_TYPE_TAB is used in dofio.c . 57 Each value corresponds to a value above, and must be 58 ED for editing terms: I,IM,F,E,EE,D,DE,G,GE,L,A,AW 59 NED for nonediting terms which change the I/O stream: 60 X,SLASH,APOS,H,TL,TR,T 61 and just the value of the term for all others. 62 63 E.g. SP is defined above as 17, so the element 17 of 64 OP_TYPE_TAB (counting from zero) is SP since SP does not 65 read or write data; 66 IM is defined as 10 so the element 10 of OP_TYPE_TAB 67 is ED since IM edits data from the i/o list. 68 */ 69 #define OP_TYPE_TAB {0, RET, REVERT, GOTO, NED, NED, STACK, ED, ED, NED, \ 70 ED, NED, NED, NED, NED, NED, COLON, S, SP, SS, P, \ 71 BNZ, B, ED, ED, ED, ED, ED, ED, ED, ED, ED, ED, \ 72 R, DOLAR, SU } 73 74 #define FMTUNKN -1 75 #define FMTOK 1 76 #define FMTERR 0 77 78 #define FMT_COMP 0x101 /* indicates pre-compiled formats */ 79 80 extern struct syl *syl_ptr; 81 extern int parenlvl,revloc; 82 extern short pc; 83