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