C:/Users/Dennis/src/lang/russell.orig/src/main.c

Go to the documentation of this file.
00001 
00002 #
00003 # define DEBUG DEBUG
00004 # define LDBUG          /* etext set incorrectly */
00005 char copyright1[] = "Copyright 1986-1989 Hans-Juergen Boehm, Alan J. Demers, Kumar Srikantan, Vernon Lee, and Lucy Hederman.\n";
00006 char copyright2[] = "Copyright (c) 1990-1993 by Xerox Corporation.  All rights reserved.\n";
00007 char copyright3[] = "This material is provided as is, with no warranty expressed or implied.  Any use is at your own risk.\n";
00008 
00009 /*
00010  * Russell compiler -- Passes 1 through 5
00011  * 
00012  *  Pass 1 :
00013  *     initial syntax analysis
00014  *  
00015  *  Pass 2 :
00016  *     symbol table generation
00017  *
00018  *  Pass 3 :
00019  *     minor tree massaging
00020  *
00021  *  Pass 4:
00022  *     signature deduction and checking
00023  *
00024  *  Pass 5c:
00025  *     Vax code generation
00026  *
00027  *  Pass5d:
00028  *     Intermediate code generation (run instead of pass5c)
00029  *
00030  * Input: 
00031  *  ifile: preprocessor output
00032  *      stdin is reopened as ifile
00033  *
00034  * Output :
00035  *  ofile: VAX assembly code or intermediate code.
00036  *  sigfile: contains signature of program (-c flag only)
00037  *  optfile: contains the concatenation of optimization info from
00038  *           files mentioned in "extern" expressions
00039  *
00040  * Diagnostics :
00041  *  written to stderr
00042  *
00043  * Compiler control messages :
00044  *  written to stderr
00045  *
00046  *
00047  * Calling Sequence:
00048  * Rc [-BDSidaMcLPTGfVxXhOOOfF] actual_ifile ifile ofile [sigfile] [optfile]
00049  *          sigfile should appear only with -c
00050  *          optfile should appear only with -OO
00051  *          actual_ifile is the name of the original input file.
00052  *                  It is never opened, but is used to build function names
00053  *
00054  * Flags:
00055  *      B   - Debugging flag. Turn on bad allocation debug.
00056  *      D   - Debugging flag. Turn on yydebug.
00057  *      S   - Debugging. Catch signals and flush buffers before aborting.
00058  *      i   - Just build the syntax tree, and write out the final core image
00059  *            on rc.x .  rc.x is in a.out format.  The parse tree produced by
00060  *            rc.x for any RUSSELL program will then be inserted
00061  *            in place of the denotation represented by <cntrl b> in the
00062  *            first program.  Compilation then proceeds as normal. This allows 
00063  *            building initialized RUSSELL compilers which know about a 
00064  *            certain standard prologue.
00065  *              Boolean and Integer should be defined in the standard Prologue.
00066  *            Boolean must be defined as a parameter.  The initial occurrence
00067  *            of the identifier Boolean must be as the first identifier in a
00068  *            list of parameters having the same signature. (Generally it will
00069  *            be the only element of such a list. )
00070  *              This is of course both machine and operating system dependent.
00071  *            It is intended to work only with
00072  *            Berkeley VAX UNIX. (Which form is used depends on macros de-
00073  *            fined in parm.h.) An old style a.out file is produced on the VAX.
00074  *      d -   Same as i except produces a demand loadable file on the VAX.
00075  *            This requires that the old version of Rc also be demand 
00076  *            loadable.
00077  *      a -   Generate abstract syntax rather than VAX code.
00078  *            (obsolete, no longer implemented.)
00079  *      M -   allocate all variables in memory. (Opposite of R)
00080  *      c -   Generate code only for the user supplied (not initial env.)
00081  *            code.  Set things up so that it can be called from another
00082  *            Russell program.  Write signature information onto sigfile.
00083  *      p -   infile is preprocessor output.
00084  *      L -   Allow functions with trailing var Void argument to violate
00085  *            import rule.
00086  *      P -   Generate code to count function calls
00087  *      T -   Generate trace code
00088  *      G -   Generate general intermediate code
00089  *      V -   Verbose - print call graph info on stdout
00090  *      N -   No use of Callcc
00091  *      f -   It is not possible to update the stack pointer SP
00092  *            HINT ONS is however assumed to be understood by the code
00093  *            generator.
00094  *      F -   Same as f, but in addition BSF functions can't access GF
00095  *            and GAR instructions must precede first nested procedure call.
00096  *            HINT ONS is not assumed to be understood.
00097  *      R -   use registers for identifier bindings
00098  *      O -   optimize at the expense of compilation time and possibly
00099  *            execution space
00100  *      OO -  also prepare to run intermediate code optimizer
00101  *      OOO - unroll loops once
00102  *      X -   compile an externally callable type.
00103  *      x -   Generate code for Xerox Portable Common Runtime.
00104  *      h -   heap allocate variables and activation records, unless the
00105  *            variables would otherwise be in registers.
00106  */
00107 
00108 # include <stdio.h>
00109 # include <a.out.h>
00110 # include "parm.h"
00111 # include "arith.h"
00112 
00113 typedef long NODE;          /* Not really, but dont want to include */
00114                             /* streedefs here.                      */
00115 
00116 # define NIL ((NODE *)0)
00117 
00118 /*  Flag args. */
00119 boolean BADflag;
00120 boolean initflag;
00121 boolean dloadflag;
00122 boolean aflag;
00123 boolean Mflag;
00124 boolean cflag;
00125 boolean pflag;
00126 boolean Lflag;
00127 boolean Pflag;
00128 boolean Tflag;
00129 boolean Gflag;
00130 boolean Vflag;
00131 boolean Nflag;
00132 boolean fflag;
00133 boolean Fflag;
00134 boolean Rflag;
00135 boolean Oflag;
00136 boolean OOflag;
00137 boolean OOOflag;
00138 boolean Xflag;
00139 boolean xflag;
00140 boolean hflag;
00141 long max_int_regs;
00142 long max_addr_regs;
00143 
00144 char * entry_name;  /* "" for regular compilations.  Used for -c */
00145 
00146 extern int GC_dont_gc;
00147 
00148 /*
00149  *  Input and output file names and declarations.
00150  */
00151 char *ifname;
00152 char *ofname;
00153 char *sigfname;
00154 char *optfname;
00155 char *actual_ifname;
00156 FILE *ofile;
00157 FILE *sigfile;
00158 FILE *optfile;
00159 
00160 /*
00161  *  In-line code production for type constructions
00162  */
00163 
00164 char * Vspcl_to_inline();
00165 char * Gspcl_to_inline();
00166 char * (* spcl_to_inline)();
00167 
00168 /*
00169  *  Input translation for in-line specifications
00170  */
00171 char * Vinline_cnvt(s)
00172 char *s;
00173 { return(s); }
00174 
00175 char * Ginline_cnvt();
00176 
00177 char * (* inline_cnvt)();
00178 
00179 /*
00180  *  Yacc flags 
00181  */
00182 extern int yynerrs;
00183 extern int yydebug;
00184 
00185 /*
00186  *  Current file name, line number
00187  */
00188 extern unsigned yyinfnm;  /* string table pointer */
00189 extern int yyline;
00190 
00191 /*
00192  * end of text symbol used in writing out initialized compiler
00193  */
00194 
00195 extern etext;
00196 
00197 /*
00198  * Syntax tree produced by pass 0.
00199  */
00200 extern NODE * stxtree;
00201 extern NODE * insrtptr;
00202 
00203 main(argc,argv)
00204 int argc;
00205 char **argv;
00206 {   int argn;   /* arg number currently being processed. */
00207 
00208 #   ifdef VERBOSE
00209         fprintf(stderr, "Starting up\n");
00210 #   endif
00211     if (insrtptr == NIL) {
00212         /* Not a pre-initialized compiler */
00213 /*        GC_dont_gc = TRUE; */
00214         GC_init();
00215     }
00216     /* Initialize flags */
00217         dloadflag = initflag = BADflag = aflag = yydebug = FALSE;
00218     /* Initialize file name pointers. */
00219         ifname = ofname = sigfname = optfname = actual_ifname = (char *)0;
00220     for (argn = 1; argn < argc; argn++) {
00221         switch ( argv[argn][0] ) {
00222             case '-' :
00223                 {   char *flagp;
00224                     for (flagp = &(argv[argn][1]); *flagp != '\0'; flagp++) {
00225                         switch (*flagp) {
00226                             case 'B':
00227                                 BADflag++;
00228                                 break;
00229                             case 'D':
00230                                 yydebug++;
00231                                 break;
00232                             case 'S':
00233                                 catchsigs();
00234                                 break;
00235                             case 'i':
00236                                 initflag = TRUE;
00237                                 break;
00238                             case 'd':
00239                                 initflag = TRUE;
00240                                 dloadflag = TRUE;
00241                                 break;
00242                             case 'a':
00243                                 aflag = TRUE;
00244                                 break;
00245                             case 'M':
00246                                 Mflag = TRUE;
00247                                 break;
00248                             case 'c':
00249                                 cflag = TRUE;
00250                                 break;
00251                             case 'p':
00252                                 pflag = TRUE;
00253                                 break;
00254                             case 'L':
00255                                 Lflag = TRUE;
00256                                 break;
00257                             case 'P':
00258                                 Pflag = TRUE;
00259                                 break;
00260                             case 'T':
00261                                 Tflag = TRUE;
00262                                 break;
00263                             case 'G':
00264                                 Gflag = TRUE;
00265                                 break;
00266                             case 'V':
00267                                 Vflag = TRUE;
00268                                 break;
00269                             case 'N':
00270                                 Nflag = TRUE;
00271                                 break;
00272                             case 'f':
00273                                 fflag = TRUE;
00274                                 break;
00275                             case 'F':
00276                                 fflag = TRUE;
00277                                 Fflag = TRUE;
00278                                 break;
00279                             case 'R':
00280                                 Rflag = TRUE;
00281                                 break;
00282                             case 'O':
00283                                 if (OOflag) {
00284                                     OOOflag = TRUE;
00285                                 } else if (Oflag) {
00286                                     OOflag = TRUE;
00287                                 } else {
00288                                     Oflag = TRUE;
00289                                 }
00290                                 break;
00291                             case 'X':
00292                                 Xflag = TRUE;
00293                                 break;
00294                             case 'x':
00295                                 xflag = TRUE;
00296                                 break;
00297                             case 'h':
00298                                 hflag = TRUE;
00299                                 break;
00300                             default:
00301                                 dbgmsg("Rc: illegal flag option: %c\n", *flagp);
00302                                 abort();
00303                         }
00304                     }
00305                 }
00306 
00307             case '\0' :
00308                 break;
00309 
00310             default:
00311                 if ( actual_ifname == (char *)0 ) {
00312                     actual_ifname = argv[argn];
00313                 } else if ( ifname == (char *)0 ) {
00314                     ifname = argv[argn];
00315                 } else if (ofname == (char *)0) {
00316                     ofname = argv[argn];
00317                 } else if (sigfname == ((char *)0) && cflag) {
00318                     sigfname = argv[argn];
00319                 } else if (optfname == ((char *)0) && OOflag) {
00320                     optfname = argv[argn];
00321                 } else {
00322                     fprintf(stderr, "Rc: Too many args\n");
00323                     exit(1);
00324                 }
00325                 break;
00326         }
00327     }
00328 
00329     if (ofname == ((char *)0)) {
00330         fprintf(stderr, "Rc: Too few arguments\n");
00331         exit(1);
00332     }
00333     if (cflag && sigfname == ((char *)0)) {
00334         fprintf(stderr, "Rc: Missing file name for signature info\n");
00335         exit(1);
00336     }
00337     if (OOflag && optfname == ((char *)0)) {
00338         fprintf(stderr, "Rc: Missing file name for optimization info\n");
00339         exit(1);
00340     }
00341 
00342     if (Xflag && !Gflag) {
00343         fprintf(stderr, "Vax code generator cannot be used with -X\n");
00344         exit(1);
00345     }
00346 
00347     /* Set up max_..._regs appropriately */
00348         max_int_regs = 0;
00349         max_addr_regs = 0;
00350         if (Mflag && Rflag) {
00351             fprintf (stderr, "-M contradicts -R, ignoring both\n");
00352             Mflag = Rflag = FALSE;
00353         }
00354 #       ifdef SUN
00355             if (!Mflag) {
00356 #             ifdef GEN_C
00357                 /* Regs ~ C variables.  There is no point in not using */
00358                 /* all we can.                                         */
00359                   Rflag = TRUE;
00360 #             else
00361                 /* Try to allocate 3 int variable and 1 ptr variable */
00362                 /* to regs. This leaves a few for temporaries.       */
00363                 max_int_regs = 3;
00364                 max_addr_regs = 1;
00365 #             endif
00366             }
00367 #       endif
00368 #       ifdef RT
00369             if (!Mflag) {
00370                 /* Leave the decisions to the register allocator.  It does */
00371                 /* MUCH better than we can here.                           */
00372                 Rflag = TRUE;
00373             }
00374 #       endif
00375 
00376     /* Initialize */
00377         if (insrtptr == NIL /* no previous initialization has taken place */) {
00378             initids();
00379             if (Gflag) {
00380                 init_RIC_table();
00381             }
00382         }
00383 
00384     /* open input file */
00385         if ( freopen( ifname, "r", stdin ) == NULL ) {
00386             fprintf(stderr, "Can't open %s\n", ifname);
00387             exit(1);
00388         }
00389 
00390     if (OOflag) {
00391       /* Open file for optimization info */
00392         optfile = fopen(optfname, "w");
00393         if (optfile == NULL) {
00394             fprintf(stderr, "Can't open %s\n", optfname);
00395             exit(1);
00396         }
00397     }
00398     /* Set up entry_name */
00399       if (cflag || Xflag) {
00400         int ifname_len = strlen(actual_ifname);
00401         char * p;
00402 
00403         entry_name = (char *) malloc(ifname_len+1);
00404         strcpy(entry_name, actual_ifname);
00405         if (entry_name[ifname_len-2] == '.') {
00406             entry_name[ifname_len - 2] = '\0';
00407         }
00408         /* Replace all slashes by periods. */
00409           for (p = entry_name; *p != '\0'; p++) {
00410             if (*p == '/') {
00411                 *p = '.';
00412             }
00413           }
00414       } else {
00415         entry_name = "";
00416       }
00417     
00418     /* Set up correct line number, file name */
00419       if (!pflag) {
00420         yyinfnm = stt_enter(ifname, strlen(ifname)+1);
00421         yyline = 0;
00422         addposition(yyinfnm, yyline);
00423       }
00424 
00425     if (!Gflag) { Rflag = FALSE; }
00426 
00427     /* Set up correct input translation for in-line code */
00428       if (Gflag) {
00429         inline_cnvt = Ginline_cnvt;
00430       } else {
00431         inline_cnvt = Vinline_cnvt;
00432       }
00433 
00434     /*
00435      * Build syntax tree (pass 1).
00436      */
00437 #       ifdef VERBOSE
00438             fprintf(stderr, "Calling yyparse\n");
00439 #       endif
00440         yyparse();
00441 
00442 
00443     if( yynerrs != 0 )
00444         exit(1);
00445 
00446     if( initflag ) {
00447         /* write out current core image (except for stack) as a loadable file */
00448                 /* and quit */
00449             int rcxdescr;  /* output file descriptor */
00450             struct exec hdr;  /* header for file */
00451             unsigned sbrkval; /* least unused location */
00452             long symtsize = 4; /* size of empty string table */
00453             long end_text;
00454             long page_size;
00455 #           ifdef SUN
00456                 long begin_data = roundup(((long) (&etext)), SEGSIZ);
00457 #           endif
00458 
00459             /* make sure stdout buffer is empty in core image */
00460                 fflush(stdout);
00461 
00462             if ( (rcxdescr = creat((Gflag? "Grc.x" : "rc.x"),0755)) == -1 ) {
00463                 fprintf(stderr, "Can't create %s\n",
00464                         (Gflag? "Grc.x" : "rc.x"));
00465                 exit(1);
00466             }
00467             /* initialize hdr */
00468 #               ifdef SUN
00469                     page_size = PAGSIZ;
00470 #               else
00471 #                   ifdef PYRAMID
00472                         page_size = 2048;
00473 #                   else
00474 #                       ifdef RT
00475                             page_size = 2048;
00476 #                       else
00477                             page_size = 1024;
00478 #                       endif
00479 #                   endif
00480 #               endif
00481                 sbrkval = (long) sbrk(0);
00482                 if (dloadflag) {
00483 #                   ifdef SUN
00484 #                     ifdef LDBUG
00485                         end_text = roundup((((long) &etext)-32), page_size);
00486                         /* This is a kludge to avoid what looks like a    */
00487                         /* SUN 3.0 ld bug.  It appears that etext is off  */
00488                         /* by 32.                                         */
00489 #                     else
00490                         end_text = roundup(((long) &etext), page_size);
00491 #                     endif
00492 #                   else
00493                         end_text = roundup(((long) &etext), page_size);
00494 #                   endif
00495                 } else {
00496                     end_text = (long) &etext;
00497                 }
00498 #               ifdef SUN
00499                     if (!dloadflag) {
00500                         fprintf(stderr, "Use -d instead of -i\n");
00501                         exit(1);
00502                     }
00503                     hdr.a_text = end_text - page_size;
00504 #               else
00505                     hdr.a_text = end_text;
00506 #               endif
00507                 if (dloadflag) {
00508 #                   ifdef VERBOSE
00509                         fprintf(stderr,
00510                                 "Generating demand paged core image\n");
00511 #                   endif
00512                     /* generate demand paged output */
00513                     hdr.a_magic = ZMAGIC;
00514                 } else {
00515 #                   ifdef VERBOSE
00516                         fprintf(stderr,
00517                                 "Generating core image\n");
00518 #                   endif
00519                     hdr.a_magic = OMAGIC;
00520                 }
00521 #               ifdef SUN
00522                     hdr.a_machtype = MACH_TYPE;
00523                     hdr.a_data = sbrkval - begin_data;
00524 #               else
00525 #                 ifdef RT
00526                     hdr.a_data = sbrkval - 0x10000000;
00527 #                 else
00528                     /* Contiguous text and data segments */
00529                     hdr.a_data = sbrkval - end_text;
00530 #                 endif
00531 #               endif
00532                 if (dloadflag) hdr.a_data = roundup(hdr.a_data,page_size);
00533                 hdr.a_bss = 0;
00534                 hdr.a_syms = 0;
00535 #               ifdef SUN
00536                     hdr.a_entry = page_size + sizeof(struct exec);
00537 #               else
00538                     hdr.a_entry = 0;
00539 #               endif
00540                 hdr.a_trsize = hdr.a_drsize = 0; /* no relocation */
00541             /* Write the file */
00542                 write(rcxdescr, &hdr, sizeof (struct exec));
00543 #               ifdef SUN
00544                     /* Write text segment */
00545                       if (write(rcxdescr, hdr.a_entry,
00546                                 (end_text - hdr.a_entry)) == -1) {
00547                         fprintf(stderr, "Couldn't write text segment\n");
00548                         perror("Rc");
00549 #                       ifdef UNDEFINED
00550                             fprintf(stderr,
00551                                     "Descriptor:%X, start:%X, size:%X\n",
00552                                     rcxdescr, hdr.a_entry,
00553                                     end_text - hdr.a_entry);
00554 #                       endif
00555                         exit(* ((char *) 0x80000000));
00556                       }
00557                     /* Write new data segment */
00558                       if (write(rcxdescr, begin_data,
00559                                 sbrkval - begin_data) == -1) {
00560                         fprintf(stderr, "Couldn't write data segment\n");
00561                         perror("Rc");
00562                         exit(1);
00563                       }
00564 #               else
00565                     if (dloadflag)
00566                         lseek(rcxdescr, page_size, 0);
00567 #                   ifdef RT
00568                       if (write(rcxdescr, (char *) 0, end_text) == -1) {
00569                         fprintf(stderr, "Couldn't write text segment\n");
00570                         perror("Rc");
00571                         exit(1);
00572                       }
00573                       if (write(rcxdescr, (char *)0x10000000,
00574                                           sbrkval - 0x10000000)
00575                           == -1) {
00576                         fprintf(stderr, "Couldn't write data segment\n");
00577                         perror("Rc");
00578                         exit(1);
00579                       }
00580 #                   else
00581                       if (write(rcxdescr, (char *) 0, sbrkval) == -1) {
00582                         fprintf(stderr, "Couldn't write initialized file\n");
00583                         perror("Rc");
00584                         exit(1);
00585                       }
00586 #                   endif
00587 #               endif
00588                 /* Write an empty string table */
00589 #                 ifdef SUN
00590                     lseek(rcxdescr,
00591                           hdr.a_data + hdr.a_text,
00592                           0);
00593 #                 else
00594                     lseek(rcxdescr,
00595                           (dloadflag? page_size : sizeof (struct exec))
00596                           + hdr.a_data + hdr.a_text,
00597                           0);
00598 #                 endif
00599                   write(rcxdescr, &symtsize, sizeof (long));
00600              exit(0);
00601         }
00602 
00603 
00604     /*  printf("*** End of Russell parse       \n"); */
00605     build_Idtable();
00606 
00607     if( yynerrs != 0 )
00608         exit(1);
00609 
00610     /*
00611      *  Pass2 - build symbol table
00612      */ 
00613 #       ifdef VERBOSE
00614             fprintf(stderr, "Building symbol table\n");
00615 #       endif
00616         build_symtab( stxtree );
00617         if (yynerrs != 0) exit(2);
00618 
00619     /*
00620      *  Pass3 - number tree nodes and fix up tree
00621      */
00622 
00623 #       ifdef VERBOSE
00624             fprintf(stderr, "Fixing up syntax tree\n");
00625 #       endif
00626         fixup (stxtree);
00627         if (yynerrs != 0) exit(3);
00628 
00629 
00630     if (yydebug)
00631         prtree(stxtree);
00632 
00633     GC_dont_gc = FALSE;         /* Garbage collection may be useful during */
00634                                 /* signature checking.                     */
00635 
00636 
00637     /*
00638      *  Pass4 - signature deduction and checking
00639      */
00640         /* Set up the correct routine for in_line code */
00641             if (Gflag) {
00642                 spcl_to_inline = Gspcl_to_inline;
00643             } else {
00644                 spcl_to_inline = Vspcl_to_inline;
00645             }
00646 
00647 #       ifdef VERBOSE
00648             fprintf(stderr, "Checking signatures\n");
00649 #       endif
00650         tl_checksigs(stxtree);
00651         if (yynerrs != 0) exit(1);
00652 
00653     if (yydebug)
00654         prtree(stxtree);
00655 
00656 
00657     /*
00658      *  Pass 5 - abstract syntax tree or code generation
00659      */
00660 
00661 #       ifdef VERBOSE
00662             fprintf(stderr, "Generating code\n");
00663 #       endif
00664         ofile = fopen(ofname, "w");
00665         if ( ofile == NULL ) {
00666             fprintf(stderr, "Can't create output file (%s)\n", ofname);
00667             exit(8);
00668         }
00669         if (aflag)
00670             /* generate abstract syntax only */
00671                 fprintf(stderr,
00672                         "Abstract syntax generation no longer implemented\n");
00673         else {
00674             extern NODE * bld_den_seq_f();
00675             extern NODE * signature_f();
00676             extern NODE * first_elmnt();
00677 
00678             /* generate vax or intermediate code */
00679                 if (cflag) {
00680                     /* Partial compilation - need to write out signature */
00681                     /* and external file info                            */
00682                     if (Gflag) {
00683                       Ggeneratepcode( ofile, stxtree,
00684                                       first_elmnt(bld_den_seq_f(insrtptr)) );
00685                     } else {
00686                       Vgeneratepcode( ofile, stxtree,
00687                                       first_elmnt(bld_den_seq_f(insrtptr)) );
00688                     }
00689                     if (yynerrs > 0) exit(1);
00690                     sigfile = fopen(sigfname, "w");
00691                     if (sigfile == NULL) {
00692                         fprintf(stderr, "Can't open %s\n", sigfname);
00693                         exit(1);
00694                     }
00695                     /* Write &etext to allow checking of compiler version */
00696                         putw(&etext, sigfile);
00697 
00698                     /* Copy object file list to signature file */
00699                     /* Terminate with empty line               */
00700                         {
00701                             extern FILE * objfilelist;
00702                             int c;
00703 
00704                             /* Probably still open for writing. */
00705                             /* Close and reopen                 */
00706                                 if (objfilelist != NULL) {
00707                                     fclose(objfilelist);
00708                                 }
00709                                 objfilelist = fopen(OBJFILELIST, "r");
00710                             if (objfilelist != NULL) {
00711                                 while ((c = getc(objfilelist)) != EOF) {
00712                                     putc(c, sigfile);
00713                                 }
00714                             }
00715                             putc('\n', sigfile);
00716                         }
00717                     sig_out(sigfile, signature_f(insrtptr));
00718                     fclose(sigfile);
00719                 } else if (Xflag) {
00720                     /* Generate externally callable versions of all   */
00721                     /* functions in a type expression.                */
00722                       GgenerateXcode( ofile, stxtree,
00723                                       first_elmnt(bld_den_seq_f(insrtptr)) );
00724                 } else {
00725                     if (Gflag) {
00726                       Ggeneratecode( ofile, stxtree );
00727                     } else {
00728                       Vgeneratecode( ofile, stxtree );
00729                     }
00730                     if (yynerrs > 0) exit(1);
00731                 }
00732         }
00733         fflush( ofile );
00734     exit(0);
00735 }

Generated on Fri Jan 25 10:39:46 2008 for russell by  doxygen 1.5.4