/* ======================================================================== bisl_main.c - command-line entry point and error-handlingfor BISL Copyright 1996 Micah Beck / Simon D. Levy University of Tennessee All distributions of this product must include source code. Source code is not to be distributed in any modified form. ======================================================================== */ #include "bisl.h" /* ------------------------------------------------------------------------ main - BISL entry point. Program reads from file .bsl and writes to file .java, where .bisl is specified in command-line argument. ------------------------------------------------------------------------ */ main(int argc, char **argv) { if (argc < 2) /* check args */ { fprintf(stderr, "Usage: bisl \n"); exit(-1); } compile_file(argv[1]); /* compile */ exit(0); /* success */ } /* main */ /* ======================================================================== handle_error - error handler. Exits after reporting error. ======================================================================== */ void handle_error(char *msg) { fprintf(stderr, "%s\n", msg); exit(1); } /* handle_error */