Hiding Yacc vars

Bill Lorensen lorensen at dwaskill.crd.ge.com
Thu Jun 15 21:15:42 AEST 1989


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 at crd.steinmetz.ge.com



More information about the Comp.unix.questions mailing list