Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!wuarchive!uwm.edu!rutgers!cmcl2!phri!news From: roy@alanine.phri.nyu.edu (Roy Smith) Newsgroups: comp.unix.wizards Subject: Multiple lex parsers in one program Message-ID: <1989Dec24.161118.20511@phri.nyu.edu> Date: 24 Dec 89 16:11:18 GMT Sender: news@phri.nyu.edu (News System) Organization: Public Health Research Institute, New York City Lines: 12 Is there a portable way to have multiple lex parsers in a program? I suppose what it needed is some flag to lex to tell it the name of the routine it is writing (instead of yylex) and to keep all of its other globals "static external" so they aren't seen outside of the c source file produced. The best I can think of with the standard lex is to write some awk script to hack up the lex output, but that hardly seems portable. -- Roy Smith, Public Health Research Institute 455 First Avenue, New York, NY 10016 roy@alanine.phri.nyu.edu -OR- {att,philabs,cmcl2,rutgers,hombre}!phri!roy "My karma ran over my dogma"