1984-11-27 22:11:59 +00:00
|
|
|
#include "bem.h"
|
|
|
|
|
1984-11-27 23:13:28 +00:00
|
|
|
#ifndef NORSCID
|
|
|
|
static char rcs_id[] = "$Header$" ;
|
|
|
|
static char rcs_bem[] = RCS_BEM ;
|
|
|
|
static char rcs_symb[] = RCS_SYMB ;
|
|
|
|
static char rcs_graph[] = RCS_GRAPH ;
|
|
|
|
#endif
|
|
|
|
|
1984-11-27 22:11:59 +00:00
|
|
|
/* Author: M.L. Kersten
|
|
|
|
**
|
|
|
|
** This is the main routine for the BASIC-EM frontend.
|
|
|
|
** Program parameters are decoded, the BASIC program is parsed
|
|
|
|
** and compiled to an executable program
|
|
|
|
**
|
|
|
|
** Bem expects at least three parameters. One ending with '.i' is considered
|
|
|
|
** the input to the compiler, '.e' denotes the file to be generated,
|
|
|
|
** and the last name denotes the name of the user supplied file name.
|
|
|
|
** The latter is used to store the data entries.
|
|
|
|
** Additional flags may be supplied, see parseparms.
|
|
|
|
*/
|
|
|
|
|
|
|
|
char *program;
|
|
|
|
|
|
|
|
char datfname[MAXFILENAME] ;
|
|
|
|
char tmpfname[MAXFILENAME] ;
|
|
|
|
|
|
|
|
char *inpfile, *outfile;
|
|
|
|
main(argc,argv)
|
|
|
|
int argc;
|
|
|
|
char **argv;
|
|
|
|
{
|
|
|
|
extern int errorcnt;
|
|
|
|
|
|
|
|
/* parseparams */
|
|
|
|
parseparams(argc,argv);
|
|
|
|
/* initialize the system */
|
|
|
|
initialize();
|
|
|
|
/* compile source programs */
|
|
|
|
compileprogram(program);
|
|
|
|
linewarnings();
|
1987-02-23 09:18:41 +00:00
|
|
|
if( errorcnt) {
|
|
|
|
unlink(tmpfname);
|
|
|
|
exit(-1);
|
|
|
|
}
|
1984-11-27 22:11:59 +00:00
|
|
|
/* process em object files */
|
|
|
|
simpleprogram();
|
1987-03-09 12:54:03 +00:00
|
|
|
exit(0);
|
1984-11-27 22:11:59 +00:00
|
|
|
}
|