Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!oberon!cit-vax!ucla-cs!zen!ucbvax!ucdavis!iris!windley From: windley@iris.ucdavis.edu (Phil Windley) Newsgroups: comp.sys.ibm.pc,comp.unix.questions,comp.unix.wizards Subject: Re: Porting output of Yacc and Lax to the IBbuM Message-ID: <340@ucdavis.ucdavis.edu> Date: Thu, 8-Oct-87 00:12:10 EDT Article-I.D.: ucdavis.340 Posted: Thu Oct 8 00:12:10 1987 Date-Received: Sat, 10-Oct-87 17:44:09 EDT References: <468@aoa.UUCP> Sender: uucp@ucdavis.ucdavis.edu Reply-To: windley@iris.ucdavis.edu (Phil Windley) Organization: U.C. Davis - College of Engineering Lines: 38 Keywords: yacc lax ibm pc Xref: mnetor comp.sys.ibm.pc:8801 comp.unix.questions:4447 comp.unix.wizards:4759 In article <468@aoa.UUCP> rob@aoa.UUCP (Rob Everton) writes: >Seeking comments on the process of developing a small language >compiler system for the ibm pc family using Yacc and Lax >from a different machine, probably 3b1 unix pc's or something. > >Has anyone tried this? > I recently *tried* (the operative word) to port an object-oriented language developed here at UCD to an IBM. I didn't have problems with YACC and LEX, just things like memory models, etc. Here's what I learned about YACC and LEX from it: a) If you have access to another machine you can run your .y and .l filesd trough YACC and LEX respectively, giving you .c programs. Those will compile using Microsoft C 4.0 just fine (I used ULTRIX 2.0 YACC and LEX, but I think that YACC and LEX are pretty standard, I could be wrong.) b) the parser will run fine. The lexer will need to be linked with the lex library. The lex library has four or five quite short routines like yyless(). I will leave it up to you to decide how you get the source and make a simlar library for your PC. c) Given the above two things, you don't need YACC and LEX for the PC if you have them available elsewhere. The parser we wrote (which is not as large as an ADA parser, but still not insignificant, works great. Since we were not careful with pointers/integers (and on a 32 bit machine, you don't really have to be) the rest runs fine on 68000's, VAX's, etc and crashes a 16 bit machine like the 80286. Phil Windley Robotics Research Lab University of California, Davis Phil Windley Robotics Research Lab University of California, Davis