Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!crdgw1!montnaro From: montnaro@sprite.crd.ge.com (Skip Montanaro) Newsgroups: comp.unix.questions Subject: Reentrant Lex? Message-ID: Date: 26 Oct 89 16:48:06 GMT Sender: news@crdgw1.crd.ge.com Reply-To: (Skip Montanaro) Organization: GE Corporate Research & Development, Schenectady, NY Lines: 16 Can lexical analyzers built using lex be made reentrant? Making yyparse() (yacc's output) wasn't too difficult (at least I didn't think so - I still need a reentrant lexical analyzer to test it with :-), but yylex() and yylook() are nasty looking pieces of code. Failing reentrant lex output, is flex output reentrant, or can it be made so? It's not worth a whole bunch of effort. If I have to spend more than a couple of hours on the task, I'll just write my lexical anlyzer by hand. Thanks, -- Skip Montanaro (montanaro@crdgw1.ge.com)