Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Dec 1996 10:21:34 GMT
From:      rb@gid.co.uk (Bob Bishop)
To:        Terry Lambert <terry@lambert.org>
Cc:        hackers@freebsd.org
Subject:   Re: Yacc -p<NAME> is broken
Message-ID:  <v01540b00aecda232d9b7@[194.32.164.2]>

next in thread | raw e-mail | index | archive | help
At 7:13 pm 5/12/96, Terry Lambert wrote:
>[...]
>Frequently, if you are mixing grammars, you have a -P<NAME> on the lex
>to go with the -p<NAME> 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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v01540b00aecda232d9b7>