#1 re-entrant lwes_emitter_create

Next Minor Release
C API (1)

it would be nice lwes_emitter_create() was re-rentrant (since flex/bison is compiled non-re-entrant) or held a lock. lwes_emitter_create() should probably be only used once per thread. i'll get clarity into how important this is soon. thanks.


  • Michael Lum

    Michael Lum - 2009-04-10

    will look into making the ESF parser re-entrant.

    pthreads is not linked by design so that LWES has a minimal dependency set (for those wanting to use it in embedded applications)

  • Michael Lum

    Michael Lum - 2009-04-10
    • milestone: --> Next Minor Release
    • labels: --> C API
    • assigned_to: nobody --> mlum
  • Michael Lum

    Michael Lum - 2009-04-22

    Some progress has been made in revisions 101 and 110, however, it is not quite complete.

    These changes are released in lwes-0.22.3.

    These changes change the bison parser to use the "pure parser" mode. However, there still need to be changes in order to have a reentrant flex. The most problematic part is that many systems still have flex-2.5.4 on them (RHEL5/CentOS 5 being the most common) and reentrant flex lexers were introduced after that version.

    For lwes-0.23.x, I'm suggesting the following:
    - add a configure.ac macro to detect flex version and add a --enable-reentrant configure flag that requires a newer flex that supports the %option reentrant string
    - add respective flags in config.h, and preprocessors in the .l and .y files depending on the value of the reentrant option

    Users can then choose to compile lwes using a newer flex with reentrant support, or the older flex without it.

    The latest change does allow multiple parsers to be created though.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks