[comp.compilers] Yet Another question about lex/yacc.

przemek@viewlogic.com (Przemek Skoskiewicz) (02/13/91)

Hello everybody,

Ever took a close look at the C file produced by the lex/yacc combo?  I want
to move that file to a 386 PC under DOS.  I've succeeded so far, in that it
compiles and runs correctly.  The problem is that its static arrays take up
too much static space (> 13K).  A solution has been suggested that I dimension
those arrays.  The lex/yacc code produces something like this:

	static int yyblah [] = {.....}

If I could force lex/yacc to put a number inside those brackets, the Borland C
compiler will put this data somewhere else (?) and leave me more static space
to play with.  Now, how do I do this?  I know how to write Unix and EMACS
scripts to accomplish that, but would like to find out if it is possible to do
it "internally", so to speak, i.e. tell lex/yacc to do it for me.

Any thoughts?

--
                                        Przemek Skoskiewicz
                                        
                                        Viewlogic Systems, Inc.
                                        293 Boston Post Road West
                                        Marlborough, MA 01752-4615, USA

                                        tel. 508-480-0881 x.233
                                        email: przemek@viewlogic.com
[I'd think that some judiciously placed "far" keywords in the template
should do the trick. -John]
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.