delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/09/07:19:12

Message-Id: <4.2.0.58.19990709130547.00a5f650@hal.nt.tuwien.ac.at>
X-Sender: tony AT hal DOT nt DOT tuwien DOT ac DOT at
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58
Date: Fri, 09 Jul 1999 13:18:39 +0200
To: djgpp AT delorie DOT com
From: Anton Helm <tony AT nt DOT tuwien DOT ac DOT at>
Subject: Hiding globals when using flex/bison in a library
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

I have a (C-)program that uses 3 different flex/bison pairs to
parse diferent input files. This works fine with renaming the
yy_ to something else by commandline switch.

Now I would like to put some parts of the program into a library.
The goal is to hide all internal functions of the library from
the user (using statics and local variables only).
But flex and bison use global variables to exchange information
(and define some others too).
Any idea how to hide these global variables and functions from 
the user of the library, so they don't conflict with any functions
and globals on the user's part of the program ?

Tony



**************************************************************
Dipl.-Ing. Anton HELM   *T*  mailto:tony AT nt DOT tuwien DOT ac DOT at
Institut fuer           *U*  http://www.nt.tuwien.ac.at/~tony/
Nachrichtentechnik und  *W*  http://www.nt.tuwien.ac.at/
Hochfrequenztechnik     *I*  talkto:tony AT eagle DOT nt DOT tuwien DOT ac DOT at
Guszhausstr. 25/389     *E*  phoneto:+43-1-58801-38920
A-1040 Wien, AUSTRIA    *N*  faxto:+43-1-58801-38999
**************************************************************
finger -l tony AT penguin DOT nt DOT tuwien DOT ac DOT at      for PGP public key
**************************************************************

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019