🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1294

YACC & LEX

#1294
From: venkatesh nadamuni
Date: Fri, 15 Jun 1990 23:42
10 lines
1061 bytes
I am using lex and yacc to write a parser which converts one
data format to another. I would like this parsing routine to be
a menu sub fuction of another main program. When this routine is called by selecting the menu function for the first time,
It does its job right - translates, reports errors etc. 
However, when the routine is called again, the globals that
have been set earlier are not initialized to their appropriate values. 
For instance, When I convert File1.inp (which has errors 
in line 102) to File1.out and then I try to run the routine on 
File2.inp, It still reports errors from previous File1.inp. 
Is there any way of reinitialising the YACC globals at runtime ?
Technical Details
Message-ID: <111@probtek.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!fernwood!probtek!venky

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!fernwood!probtek!venky
From: venky@probtek.UUCP (venkatesh nadamuni)
Newsgroups: comp.lang.misc
Subject: YACC & LEX
Keywords: Initializing the globals
Message-ID: <111@probtek.UUCP>
Date: 15 Jun 90 23:42:17 GMT
Distribution: usa
Organization: Probe Technology Corp., Santa Clara, CA
Lines: 10