*BSD News Article 28483


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!bunyip.cc.uq.oz.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!pipex!news.gb.ec.ps.net!aledm
From: aledm@relay-europe.ps.net (Aled Morris)
Newsgroups: comp.os.386bsd.apps
Subject: Re: Xrn for FreeBSD?
Date: 15 Mar 1994 18:57:22 GMT
Organization: Perot Systems Europe Ltd.
Lines: 45
Message-ID: <ALEDM.94Mar15185722@icarus.gb.ec.ps.net>
References: <CMDrrr.Cpt@unccsun.uncc.edu> <CMpxJF.KL0@ucdavis.edu>
NNTP-Posting-Host: icarus.gb.ec.ps.net
In-reply-to: ccjason@quadrophenia.ucdavis.edu's message of Tue, 15 Mar 1994 18:18:50 GMT

In article <CMpxJF.KL0@ucdavis.edu> ccjason@quadrophenia.ucdavis.edu (Jason Gabler) writes:

>James Lee Robinson (jlrobins@unccsun.uncc.edu) wrote:
>: Has anyone gotten xrn to compile on FreeBSD 1.0.2 ? It churns along merrily,
>: up until the point where it runs lex and yacc, only to tell me:
>
>: gcc  -O2 -m486   -I/usr/X386/include  -DFreeBSD    -c strtok.c
>: lex newsrc.l
>: yacc newsrc.y
>: gcc  -O2 -m486   -I/usr/X386/include  -DFreeBSD    -c y.tab.c
>: In file included from newsrc.y:155:
>: newsrc.l:51: parse error before `1'
>: *** Error code 1
>
>: Stop.
>
>
>James,
>
>	I had the same problem.  I know a little more than you it seems
>about yacc and lex :) , but still couldnt solve the problem.  i was wondering
>if it wsa just perhaps problems between free version of the interpreters
>and the "real" versions.

The problem is that the LEX clone (flex) predefines a macro "yywrap" which
conflicts with the simple function defined on line 155 of newsrc.y.

The simple fix is to wrap that function definition with:

	#ifndef yywrap
	...
	#endif

caveat: this advice is from memory.

I compiled XRN on NetBSD 0.9.  I remember also having problems with
pattern matching, since NetBSD had neither "regex" or "re_exec" (or
something along those lines).

I can send you patches if you need them.

Aled
--
aledm@relay-europe.ps.net  |  tel +44 81 476 2212
Perot Systems Europe Ltd.  |  fax +44 81 476 2419