🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sw.components
Article #380

Re: two (or more) lex's/yacc's in one executable

#380
From: Alex Blakemore
Date: Sun, 09 Dec 1990 22:06
30 lines
2086 bytes
In article <1990Dec6.201421.13444@cs.columbia.edu> leland@cs () writes:
> I have an application that requires two discrete uses of both lex and
> yacc.  Since both lex and yacc have hardcoded names (all with the 'yy'
> prefix) for a whole bunch of global symbols, there is an immediate
> problem:  somehow the two sets must be hidden from each other and
> distinguished for any other code that accesses them.

If you are willing to use another language at least for this part
you may consider the Ada versions of lex and yacc from UC Irvine,
called ayacc and alex.  They generate the same hard coded names, but
they have Ada packages surrounding them that take their names from
the yacc input files base names. That way there are no linker
conflicts. You also get the pleasure (or pain) of programming in Ada,
depending upon your point of view.

They take virtually identical input as lex and yacc 
(of course the action rules have to change to Ada or 
Ada calls to C functions).  We have two parsers and scanners linked
into the same executable and it works fine - of course only one is
ever used at a time.  Good luck.

  I dont have access to my files with the exact addresses now but
you can get info from UCI CS dept whch is part of the Arcadia group
The net addresses are something like :
     arcadia-request@uci.cs.edu
     ayacc-info@uci.cs.edu
     alex-info@uci.cs.edu
---------------------------------------------------------------------
Alex Blakemore           blakemore@software.org        (703) 742-7125
Software Productivity Consortium  2214 Rock Hill Rd, Herndon VA 22070
Technical Details
Message-ID: <1882@software.software.org>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!software.org!blakemor
References: <1990Dec6.201421.13444@cs.columbia.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!software.org!blakemor
From: blakemor@software.org (Alex Blakemore)
Newsgroups: comp.sw.components
Subject: Re: two (or more) lex's/yacc's in one executable
Message-ID: <1882@software.software.org>
Date: 9 Dec 90 22:06:22 GMT
References: <1990Dec6.201421.13444@cs.columbia.edu>
Sender: news@software.org
Reply-To: blakemor@software.org (Alex Blakemore)
Organization: Software Productivity Consortium, Herndon, Virginia
Lines: 30