bem.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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[] = "$Header$" ;
  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 tmpfname[MAXFILENAME] ;
  27. char *inpfile, *outfile;
  28. int BEMINTSIZE = EMINTSIZE;
  29. int BEMPTRSIZE = EMPTRSIZE;
  30. int BEMFLTSIZE = EMFLTSIZE;
  31. main(argc,argv)
  32. int argc;
  33. char **argv;
  34. {
  35. extern int errorcnt;
  36. /* parseparams */
  37. parseparams(argc,argv);
  38. /* initialize the system */
  39. initialize();
  40. /* compile source programs */
  41. compileprogram();
  42. linewarnings();
  43. C_close();
  44. if( errorcnt) sys_stop(S_EXIT);
  45. /* process em object files */
  46. sys_stop(S_END); /* This was not done in the old compiler */
  47. }