Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!crdgw1!lorensen From: lorensen@dwaskill.crd.ge.com (Bill Lorensen) Newsgroups: comp.unix.questions Subject: Re: Hiding Yacc vars Message-ID: Date: 15 Jun 89 11:15:42 GMT Sender: news@crdgw1.crd.ge.com Distribution: usa Organization: GE Corporate Research & Development Lines: 23 I met Steve Johnson about six months ago. Steve is the author of yacc. I complained about the use of external variables in yacc. He mentioned that a prototype file for yyparse exists. Yacc uses it to create the parser, including user code at an indicated location. Sure enough, there is a prototype file in /usr/lib called yaccpar. It appears to be undocumented but I think you can modify this file as the posters have requested. Also, in /usr/lib/lex there are two prototype files, one for c and one for ratfor. I don't know if you can get yacc (or lex) to use your own prototype files via some command line option. Otherwise, your modifications will be used by everyone on the system (dangerous of course). -- Bill Lorensen US Mail:GE Corporate Research and Development P.O. Box 8 Bldg KW Room C207A Schenectady, NY 12301 Office: (518) 387-6744 or 8*833-3874 Fax: (518) 387-6560 or 8*833-6560 E-Mail: lorensen@crd.steinmetz.ge.com