From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 5 20:28:48 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0818E16A4DD for ; Wed, 5 Jul 2006 20:28:48 +0000 (UTC) (envelope-from randyhyde@earthlink.net) Received: from elasmtp-kukur.atl.sa.earthlink.net (elasmtp-kukur.atl.sa.earthlink.net [209.86.89.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 666C443D64 for ; Wed, 5 Jul 2006 20:28:47 +0000 (GMT) (envelope-from randyhyde@earthlink.net) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=DQLMCUBmsHAVbSFo47rAQ6MrPSokwYRu1H4SqzI54n65VnraiRWr1nGrQPSXtnAc; h=Message-ID:Date:From:Reply-To:To:Subject:Cc:Mime-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [209.86.224.40] (helo=elwamui-milano.atl.sa.earthlink.net) by elasmtp-kukur.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1FyDzK-0004Wj-Sp; Wed, 05 Jul 2006 16:28:46 -0400 Received: from 198.74.38.59 by webmail.pas.earthlink.net with HTTP; Wed, 5 Jul 2006 16:28:46 -0400 Message-ID: <4596402.1152131326848.JavaMail.root@elwamui-milano.atl.sa.earthlink.net> Date: Wed, 5 Jul 2006 13:28:46 -0700 (GMT-07:00) From: Randall Hyde To: freebsd-hackers@freebsd.org Cc: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: EarthLink Zoo Mail 1.0 X-ELNK-Trace: eba5e0c9192a36dcd6dd28457998182d7e972de0d01da940448929ee647a707c6f9c473998cf8d9e350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 209.86.224.40 Subject: Re: getc in BSD (was FLEX issues) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Randall Hyde List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2006 20:28:48 -0000 -----Original Message----- >From: Steve Kargl >Sent: Jul 4, 2006 11:40 AM >To: Randall Hyde >Cc: freebsd-hackers@freebsd.org >Subject: Re: getc in BSD (was FLEX issues) > >On Mon, Jul 03, 2006 at 11:34:41AM -0700, Randall Hyde wrote: >> >> The error reported is "syntax error before numeric constant". >> This kind of gives me the impression that "getc" is defined a bit >> differently under FreeBSD than other environments? Any ideas? > >As others have stated, getc() is implemented via a macro, >which may depend on other macros. In reading the flex >NEWS file, I ran across the -Cr option. I added this >option to your flex command, and the hla.flx file is >processed and produces a compilable lex.yy.c. > >-- >Steve Yeah, getc was the problem. I modified flex (via one the various macros it defines) to emit fgetc rather than getc and the problem went away. I'll have to try the -Cr option and see what happens there. Cheers, Randy Hyde