From owner-freebsd-hackers Fri Dec 6 02:41:54 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id CAA02985 for hackers-outgoing; Fri, 6 Dec 1996 02:41:54 -0800 (PST) Received: from isbalham (isbalham.ist.co.uk [192.31.26.1]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id CAA02980 for ; Fri, 6 Dec 1996 02:41:50 -0800 (PST) Received: from gid.co.uk (uucp@localhost) by isbalham (8.6.12/8.6.12) with UUCP id KAA00570; Fri, 6 Dec 1996 10:34:09 GMT Date: Fri, 6 Dec 1996 10:21:34 GMT Received: from [194.32.164.2] by seagoon.gid.co.uk; Fri, 6 Dec 1996 10:21:34 GMT X-Sender: rb@194.32.164.1 Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Terry Lambert From: rb@gid.co.uk (Bob Bishop) Subject: Re: Yacc -p is broken Cc: hackers@freebsd.org Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk At 7:13 pm 5/12/96, Terry Lambert wrote: >[...] >Frequently, if you are mixing grammars, you have a -P on the lex >to go with the -p on the yacc... I agree it's broken. I suspect it's always been broken, but there are other ways to skin that particular cat. Several times I've seen people stuffing lex/yacc output thru sed to fix the prefixes; I don't like that much. What I usually do is use a 'super-grammar' whose top-level rule just switches between the real gramars based on a token which I arrange to stuff up the pipe when the parser starts. Lex/yacc output seems to restartable: this works OK. -- Bob Bishop (0118) 977 4017 international code +44 118 rb@gid.co.uk fax (0118) 989 4254 between 0800 and 1800 UK