Path: 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 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 ?