From owner-freebsd-hackers Tue Sep 9 12:54:10 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA01167 for hackers-outgoing; Tue, 9 Sep 1997 12:54:10 -0700 (PDT) Received: from usr03.primenet.com (tlambert@usr03.primenet.com [206.165.6.203]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA01162 for ; Tue, 9 Sep 1997 12:54:08 -0700 (PDT) Received: (from tlambert@localhost) by usr03.primenet.com (8.8.5/8.8.5) id MAA28976; Tue, 9 Sep 1997 12:53:58 -0700 (MST) From: Terry Lambert Message-Id: <199709091953.MAA28976@usr03.primenet.com> Subject: Re: Interpreter compilers To: Temcguire@aol.com Date: Tue, 9 Sep 1997 19:53:57 +0000 (GMT) Cc: hackers@FreeBSD.ORG In-Reply-To: <970909142903_-131376035@emout04.mail.aol.com> from "Temcguire@aol.com" at Sep 9, 97 02:31:46 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Recently, I installed FreeBSD (2.2.2) on a Pentium Pro in an attempt to > upgrade from SPARC. When I attempted to build awkcc (from AT&T Toolchest) I > discovered that flex (GNU) was not happy with awk.lx.l in the awkcc source. > Seems, that flex -l option also would not accommodate the lack of POSIX > compliance in awk.lx.l. I have tried blex (Berkeley port?) and had similar > results. > > Question#1: Any suggestions on how to get around differences between AT&T lex > and GNU flex differences within FreeBSD? Yes. I can help you, but I need to know the specific error messages you got when you attempted this. There are a number of differences. If you can't disclose the messages because they contain source, you will need to do the job yourself. I recommend: lex & yacc John R. Levine, Tony Mason, Doug Brown O'Reilly & Associates, Inc. ISBN 1-56592-000-7 which describes the conversion process in detail. It assumes a working knowledge of lex (or yacc, which isn't important in your case). > In the realm of rapid prototyping with interpretive languages, there appear > to be several options in FreeBSD (1997). I noticed tcl/tk, JAVA and PERL in > particular and observed scheme and python. It appears that a compiler exists > for scheme (scheme-to-C). > > Question#2: Can PERL scripts be translated into C and compiled into > executables? Do regular expressions and associative arrays (awk) exist in > any other languages that can be translated and compiled? I have not seen a PERL to C translator, but I have not really looked. There exist both translators and JITs (Just-In-Time-compilers) for JAVA. Search Yahoo for Kaffe and follow the links around to 20 or more of them. > P.S., > The Pentium Pro I purchased (Micron Inc.) has the option of a second > processor. I have 64Mb of memory and wonder if I installed another > processor, would FreeBSD operate much faster? If you run SMP FreeBSD, it should, for concurrent tasks. SMP FreeBSD is current experimental, meaning it is not a release. Normal processes are intrinsically bound to a single CPU, so adding CPU's typically won't buy you anything, uless you are running a multiprocess server (mail services, ftp services, http services) AND you are currently CPU bound (you will get a concurrency win in that case). Threaded processes are currently not SMP scalable, but are expected to become so in the future. After that, single processes with multiple threads of control willget concurrency wins under SMP as well. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.