From: em Date: Tue, 27 Nov 1984 22:23:55 +0000 (+0000) Subject: The version of basic copied from Martin Kerstens directory. X-Git-Tag: release-5-5~5953 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=335d55ff4a9b7e20789c3fac94769ec424dfc693;p=ack.git The version of basic copied from Martin Kerstens directory. --- diff --git a/lang/basic/src.old/graph.h b/lang/basic/src.old/graph.h new file mode 100644 index 000000000..732b56e50 --- /dev/null +++ b/lang/basic/src.old/graph.h @@ -0,0 +1,29 @@ +# +/* +** The control graph is represented by a multi-list structure. +** The em code is stored on the em intermediate file already +** The offset and length is saved only. +** Although this makes code generation mode involved, it allows +** rather large BASIC programs to be processed. +*/ +typedef struct LIST { + int emlabel; /* em label used with forwards */ + int linenr; /* BASIC line number */ + struct LIST *nextlist; +} List; + +typedef struct LINERECORD{ + int emlabel; /* target label */ + int linenr; /* BASIC line number */ + long offset; /* file offset in em file */ + long codelines; /* number of em code lines */ + List *callers; /* used from where ? */ + List *gotos; /* fanout labels */ + struct LINERECORD *nextline, *prevline; + int fixed; /* fixation of block */ +} Linerecord; + +Linerecord *firstline, + *currline, + *lastline; +extern List *forwardlabel; diff --git a/lang/basic/src.old/symbols.h b/lang/basic/src.old/symbols.h new file mode 100644 index 000000000..8dee4c116 --- /dev/null +++ b/lang/basic/src.old/symbols.h @@ -0,0 +1,79 @@ +#define NIL 0 +#define TRUE 1 +#define FALSE 0 + +#define DEFAULTTYPE 500 +#define INTTYPE 501 +#define FLOATTYPE 502 +#define DOUBLETYPE 503 +#define STRINGTYPE 504 + +#define ABSSYM 520 +#define ASCSYM 521 +#define ATNSYM 522 +#define CDBLSYM 524 +#define CHRSYM 525 +#define CINTSYM 526 +#define COSSYM 527 +#define CSNGSYM 528 +#define CVISYM 529 +#define CVSSYM 530 +#define CVDSYM 531 +#define EOFSYM 532 +#define EXPSYM 533 +#define FIXSYM 534 +#define FRESYM 535 +#define HEXSYM 536 +#define INPSYM 538 +#define INSTRSYM 539 +#define LEFTSYM 540 +#define LENSYM 541 +#define LOCSYM 542 +#define LOGSYM 543 +#define LPOSSYM 544 +#define MKISYM 546 +#define MKSSYM 547 +#define MKDSYM 548 +#define OCTSYM 549 +#define PEEKSYM 550 +#define POSSYM 551 +#define RIGHTSYM 552 +#define RNDSYM 553 +#define SGNSYM 554 +#define SINSYM 555 +#define SPACESYM 556 +#define SPCSYM 557 +#define SQRSYM 558 +#define STRSYM 559 +#define STRINGSYM 560 +#define TABSYM 561 +#define TANSYM 562 +#define VALSYM 564 +#define VARPTRSYM 565 +/* some stuff forgotten */ +#define INTSYM 567 +#define AUTOSYM 568 +#define LISTSYM 569 +#define LOADSYM 570 +#define MERGESYM 571 +#define TRONSYM 572 +#define TROFFSYM 573 +#define XORSYM 574 +#define EQVSYM 575 +#define IMPSYM 576 +#define OUTSYM 577 + +#define MAXDIMENSIONS 10 + +typedef struct SYMBOL{ + char *symname; + int symalias; + int symtype; + int dimensions; /* dimension array/function */ + int dimlimit[MAXDIMENSIONS]; /* type of parameter */ + int dimalias[MAXDIMENSIONS]; + struct SYMBOL *nextsym; + int isfunction; + int parmsize; + int isparam; +} Symbol;