I have an application which requires several interactive server
threads to simultaneously parse commands from different sources. I
know that Bison can produce a reentrant parser, but the Flex
documentation is unclear on reentrancy. Is it possible (through macro
tricks if necessary) to create a reentrant ("C" only) scanner with
Flex 2.5 whose code could be shared between the threads?

I have also looked at using Antlr/Dlg for the parser, but the
available documentation for v1.33 (I don't have the book) is terrible.
Can the Antlr/Dlg combination be used to produce fully reentrant
parsers?

This is for an embedded application running on a CPU without memory
protection and with limited memory. The command processors must be
threads in a single executable and must be able to share the code.

Thanks,
George
[Flex generates reentrant scanner classes in C++, but I don't know of
any easy way to do it in C. -John]
--