Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!galaxy!andromeda.rutgers.edu!dave From: dave@andromeda.rutgers.edu.rutgers.edu (Dave Bloom) Newsgroups: comp.unix.wizards Subject: Multiple Lex Program Question Message-ID: <690@galaxy> Date: 18 Jul 88 20:40:36 GMT Sender: news@galaxy Reply-To: dave@andromeda (Dave Bloom) Organization: Rutgers University, Newark, NJ Lines: 27 Here's a question for all you lex(1) fanatics out there: What I need to do is create several lex functions to be called from the same program at different times... so instead of calling yylex(), I may want to call yylex_a(), yylex_b()... etc. Unfortunately, lex(1) has no flag that tells it to generate the automaton WITHOUT the supporting functions and externals (yycrank, yyline, etc.). So, while you can use an editor to change the name yylex() everywhere in the file, the linker still can't cope with the multiply defined symbols at link time. Does anyone have an elegant solution to this problem? I could always apply lex, then change the names of all variables/functions whose names are prefixed with "yy" in the resulting lex.yy.c, but then I wind up with duplicate functions under different names. If you have any ideas, please respond by e-mail and I will summarize (I don't normally subscribe to this group) Thanx. _______________________________________________________________________________ rutgers\ | Dave Bloom galaxy >!andromeda!dave -or- dave@andromeda.rutgers.edu | Work: (201)648-5085 pyramid/ |