Pristine Ack-5.5
[Ack-5.5.git] / lang / basic / src / graph.h
1 /*
2  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3  * See the copyright notice in the ACK home directory, in the file "Copyright".
4  */
5
6 #ifndef NORCSID
7 # define RCS_GRAPH      "$Id: graph.h,v 1.2 1994/06/24 11:30:52 ceriel Exp $"
8 #endif
9
10 /* 
11 ** The control graph is represented by a multi-list structure.
12 ** The em code is stored on the em intermediate file already
13 ** The offset and length is saved only.
14 ** Although this makes code generation mode involved, it allows
15 ** rather large BASIC programs to be processed.
16 */
17 typedef struct LIST {
18         int     emlabel;                /* em label used with forwards */
19         int     linenr;                 /* BASIC line number */
20         struct LIST *nextlist;
21 } List;
22
23 typedef struct LINERECORD{
24         int     emlabel;                /* target label */
25         int     linenr;                 /* BASIC line number */
26         List    *callers;               /* used from where ? */
27         List    *gotos;                 /* fanout labels */
28         struct LINERECORD       *nextline, *prevline;
29         int     fixed;                  /* fixation of block */
30 } Linerecord;
31
32 extern Linerecord       *firstline, 
33                 *currline, 
34                 *lastline;
35 extern List     *forwardlabel;
36
37 extern List     *gosublabel();