1 /* Loglan82 Compiler&Interpreter
2 Copyright (C) 1993 Institute of Informatics, University of Warsaw
3 Copyright (C) 1993, 1994 LITA, Pau
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program 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
13 GNU General Public License for more details.
15 =======================================================================
21 /* DATA STRUCTURES COPIED FROM LOGLAN COMPILER */
24 extern int nblus ; /* ADDRESS OF MAIN BLOCK IN IPMEM */
25 extern int nrint ; /* ADDRESS OF TYPE INTEGER IN IPMEM */
26 extern int nrre ; /* ADDRESS OF TYPE REAL IN IPMEM */
27 extern int nrbool; /* ADDRESS OF TYPE BOOLEAN IN IPMEM */
28 extern int nrchr ; /* ADDRESS OF TYPE CHAR IN IPMEM */
29 extern int nrtext ; /* ADDRESS OF TYPE STRING IN IPMEM */
30 extern int nrcor ; /* ADDRESS OF TYPE COROUTINE IN IPMEM */
31 extern int nrproc ; /* ADDRESS OF TYPE PROCESS IN IPMEM */
32 extern int lpmem ; /* THE LAST INDEX BELOW REAL CONSTANTS */
33 extern int irecn ; /* LAST INDEX OF REAL CONSTANT AREA */
34 extern int lmem ; /* ACTUAL (I.E. FROM COMPILER) SIZE OF IPMEM */
39 /* INFORMATION ADDED INTO IPMEM : */
41 /* LOWER ADDRESSES ARE OCCUPIED BY COMPILER SYMBOL TABLE */
42 /* UPPER ADDR. ARE USED IN 'CODE' FOR GENERATOR SYMBOL TABLE. */
43 /* EACH (GENERATOR) SYMBOL TABLE ITEM OCCUPIES 3 WORDS : */
44 /* (+0) = STITEM ( --> CODE) */
45 /* (+1) = VALUE OF CONSTANT */
46 /* OR OFFSET OF TEMPORARY VARIABLE, */
47 /* OR POINTER TO THE ATTRIBUTE DESCRIPTION IN COMP.SYM.TABLE */
48 /* (+2) = NEXT USE (QADDR) */
50 /* PROCEDURE 'GENPROT' MODIFIES INFORMATION IN COMPILER SYMBOL TABLE. */
51 /* PROCEDURE 'CODE' NEED THE FOLLOWING EXTRA INFORMATION : */
53 /* FOR EACH UNIT: (-1) = PROTADDR */
54 /* (+0) = ADDRESS OF 'AFTER INNER' STATEMENT */
55 /* ( STORED BY 'CODE' ) */
56 /* FOR EACH OBJECT ATTRIBUTE: */
58 /* (-1) = PROTADDR FOR THAT OBJECT */
59 /* FOR EACH TYPE (CLASS TYPE, FORMAL TYPE OR PRYMITIVE TYPE): */
60 /* (+2) = - ADDRESS OF TYPE DESCRIPTION IN M */
62 /* MOREOVER, EXTRA INFORMATION IS STORED TO LINK REFERENCES TO THE TYPES */
63 /* ( --> BACKPATCH) */
65 extern address base ; /* TOTAL LENGTH OF JUST PRODUCED CODE;
66 TO BE ADDED TO INDEX IN "SMALL" M */
67 extern address realbase ; /* BASE FOR REAL CONSTANTS */
69 extern dprotaddr prefix[ MAXPROT + 1 ] ; /* PROTOTYPE NUMBER OF PREFIX */
70 /* OR DUMMY IF PREFIX ABSENT */
74 /* TYPES OF SOME OBJECTS BELONGING TO THE ADDRESS TYPE HAVE BEEN CHANGED */
75 /* TO INTEGER. THIS HAS BEEN FORCED DUE TO THE REQUIREMENTS OF THE PASCAL */
76 /* COMPILER ACCESSIBLE ON SIEMENS WHICH DEMANDS THAT THE PROCEDURE AND */
77 /* FUNCTION PARAMETERS PASSED BY VARIABLE HAVE STRICTLY THE SAME TYPE AS */
78 /* THEIR FORMAL CORRESPONENTS. */
79 /* from addressing taken offset : */
80 extern address offset;
83 extern protaddr lastprot;
84 extern address ipradr;
85 extern pointprdsc prototype[];
86 extern pointer listofref[];
87 extern longpointer listofpar[];
88 extern protaddr unitt ;
92 extern tmpmap ltmpmap ;
93 extern tmpmapdscr * mapdscr[] ;
94 extern bool rtmpmap[] ;
95 extern bool gtmpmap[] ;
97 extern qaddr ctpoint ;
101 extern address temporary ;
102 extern protaddr proclist[] ;
104 extern address strings ;
106 extern FILE * lfile ;
107 extern FILE * pfile ;
108 extern FILE * cfile ;