kevin@kevin.scs.com (Kevin Nazareth) (08/28/90)
I am looking around for a public domain version of an interpreter for the C language. I'd prefer a verion with source, if available. Thanks in advance for any assistance. Kevin Nazareth (uunet!sdl!kevin)
ucbked@athena.berkeley.edu (Earl H. Kinmonth) (08/29/90)
In article <640@kevin.scs.com> kevin@kevin.scs.com (Kevin Nazareth) writes: >I am looking around for a public domain version of an interpreter for >the C language. I'd prefer a verion with source, if available. So am I. Until you/I find such, I would suggest kawk, part of the Bibliofile package. kawk offers a subset of the "C" language (larger than that offered by various PD "C" compilers) and an integrated environment (you screw up and the editor is positioned on where the error was detected during parsing). For example, here is a kawk programme to split a "mbox" file and get rid of included uuencode files in messages that have bounced. If you find this a reasonable approximation of C, you've found the answer to your posting. If not, hit the 'n' key. Bibliofile and kawk are free (source and executable) to any one having any flavor of **IX or any flavor of **DOS with the MKS Toolkit. Others can beg, plead, whine, or send me money, the more the better, starting at three figures and working up. Xchar ls[256]; /* ordinary line */ Xchar ws[128]; /* work string */ Xint fn; /* output file number */ Xint lc; Xint sf; /* subject file pointer */ Xchar ss[128]; /* subject line */ Xint ns; /* no subject */ Xint sl; X{ X ns = "no subject"; X sf = fopen("mailfrom.sub","w"); X strcpy(ss,ns); X setrex("[a-zA-Z0-9][@%:!][a-zA-Z0-9]"); X while(fgetls(ls,256)) { X lc += 1; X if(ls[0] == 'F' && strncmp(ls,"From ",5) == 0 && userex(ls)) { X if(ws[0]) { X fputs(ws,sf); X fputs(" ",sf); X fputs(ss,sf); X fputs("\n",sf); X strcpy(ss,ns); X } X sformat(ws,128,"mailfrom.%03d",fn); X setofn(ws); X print("O %-5d %s\r",lc,ws); X fn += 1; X } X else X if(ls[0] == 'S' && strncmp(ls,"Subject: ",9) == 0) { X strcpy(ss,strlwr(ls+9)); X } X else X if(ls[0] == '#' && strncmp(ls,"#===CUT",7) == 0) { X sl = 0; X while(fgetls(ls,256)) { X sl += 1; X if(ls[0] == 'e' && strncmp(ls,"end",3) == 0) break; X } X print("S %-5d %s\r",lc,ws); X continue; X } X puts(ls); X } X} X