bem.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. #include "bem.h"
  6. #ifndef NORSCID
  7. static char rcs_id[] = "$Id$" ;
  8. static char rcs_bem[] = RCS_BEM ;
  9. static char rcs_symb[] = RCS_SYMB ;
  10. static char rcs_graph[] = RCS_GRAPH ;
  11. #endif
  12. /* Author: M.L. Kersten
  13. **
  14. ** This is the main routine for the BASIC-EM frontend.
  15. ** Program parameters are decoded, the BASIC program is parsed
  16. ** and compiled to an executable program
  17. **
  18. ** Bem expects at least three parameters. One ending with '.i' is considered
  19. ** the input to the compiler, '.e' denotes the file to be generated,
  20. ** and the last name denotes the name of the user supplied file name.
  21. ** The latter is used to store the data entries.
  22. ** Additional flags may be supplied, see parseparms.
  23. */
  24. char *program;
  25. char datfname[MAXFILENAME] ;
  26. char *inpfile, *outfile;
  27. int BEMINTSIZE = EMINTSIZE;
  28. int BEMPTRSIZE = EMPTRSIZE;
  29. int BEMFLTSIZE = EMFLTSIZE;
  30. main(argc,argv)
  31. int argc;
  32. char **argv;
  33. {
  34. extern int errorcnt;
  35. /* parseparams */
  36. parseparams(argc,argv);
  37. /* initialize the system */
  38. initialize();
  39. /* compile source programs */
  40. compileprogram();
  41. linewarnings();
  42. C_close();
  43. if( errorcnt) sys_stop(S_EXIT);
  44. /* process em object files */
  45. sys_stop(S_END); /* This was not done in the old compiler */
  46. }