help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reentrancy


From: Laurence Finston
Subject: Reentrancy
Date: Tue, 9 Mar 2004 21:45:02 +0100 (MET)

Hello,

I'm writing the input routine for GNU 3DLDF using Bison and Flex.
I've decided to use multiple processes or possibly threads.
While I've got `yyparse()' to be reentrant, I don't see any obvious
way of doing this for `yylex()'.  I don't want to have Flex generate
a C++ scanner (which would be reentrant), partly because the
documentation says this feature is experimental and partly because I
don't see any way of getting `yyparse()' to call a member function
of an object rather than plain `yylex()'.  However, I would do so, if
there's no other way, and if someone can tell me how to solve the
second problem.

I'd be satisfied if I could find a way to make the calls to `yylex()'
atomic, since it almost always returns quickly to `yyparse()'.
However, I don't see any way of doing this.

I don't know whether `yylex()' is thread-safe, but even if is, I'd
still like it to be reentrant, so that 3DLDF isn't dependent on a
thread library.

I'd really appreciate it if someone could help me.

Laurence Finston
GNU 3DLDF maintainer







reply via email to

[Prev in Thread] Current Thread [Next in Thread]