|reentrant scanners? firstname.lastname@example.org (1998-08-13)|
|Date:||13 Aug 1998 22:09:28 -0400|
|Organization:||Deja News - The Leader in Internet Discussion|
|Keywords:||lex, C, question, comment|
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
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.
[Flex generates reentrant scanner classes in C++, but I don't know of
any easy way to do it in C. -John]
Return to the
Search the comp.compilers archives again.