Ticket #39 (closed defect: released)

Opened 4 years ago

Last modified 4 years ago

QueryParser API cleanup

Reported by: olly Owned by: olly
Priority: high Milestone:
Component: Library API Version: 0.8.5
Severity: normal Keywords:
Cc: Blocked By:
Operating System: All Blocking:

Description

QueryParser? needs to stop using static data so it's reentrant (to allow use from multiple threads).

Implementation is rather exposed (for historical reasons) - it should be hidden. Also the class should probably us PIMPL like most of the API classes do.

What operations on the prefix map are useful? omega only uses prefixes.insert(). set_prefix(), get_prefix(), erase_prefix(), and clear_prefixes() are probably enough.

Change History

Changed 4 years ago by olly

  • status changed from new to assigned
  • severity changed from blocker to normal

Changed 4 years ago by olly

Bison's C++ support is still experimental (as it has been for several years) so it rather looks like we need to stop using Bison to fix the reentrancy issues.

The options are something yacc-like (e.g. Lemon uses a similar syntax to yacc/bison, but isn't 100% compatible) or something more radically different (e.g. spirit which allows you to write C++ code which closely mirrors BNF grammar rules - by clever use of operator overloading and templates the code-generation stage is done by C++). Spirit steers you towards using exceptions for error recovery (which we want to avoid as ultimately we'd like to stop using exceptions inside the library) but it looks like this isn't actually a requirement.

Changed 4 years ago by olly

  • rep_platform changed from Other to All
  • version changed from other to 0.8.5
  • component changed from other to Library API
  • op_sys changed from other to All

I've mostly completed a port from bison to lemon, which fixes the reentrancy issues. Not yet in CVS - I want need to sort out the file naming first.

Changed 4 years ago by olly

  • status changed from assigned to closed
  • resolution set to fixed

Changed 4 years ago by olly

  • resolution changed from fixed to released

Fixed in 0.9.0

Changed 4 years ago by trac

  • platform set to All
Note: See TracTickets for help on using tickets.