[comp.lang.c] calling yyparse

ssdken@watson.Claremont.EDU (Ken Nelson) (08/11/90)

 This is a varient of a similar question about using Lex and Yacc
 on a string.


 I need to do something like this:

   a_double =  eval_yyparse("x+y/2");
   a_double =  eval_yyparse("sin(x)");

 How can I restart the grammar?  I think I may be able to do it
 by re-initializing all the YACC variables that are set at compile
 time.  Anybody see any holes in this idea, or even better a 
 handy dandy set of routines to do it!


		Thanks,


				Ken Nelson
				Principal Engineer
				Software Systems Design
				3627 Padua Av.
				Claremont, CA 91711
				(714) 624-3402