Opened 20 years ago

Closed 19 years ago

Last modified 19 years ago

#39 closed defect (released)

QueryParser API cleanup

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

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 (5)

comment:1 by Olly Betts, 20 years ago

Severity: blockernormal
Status: newassigned

comment:2 by Olly Betts, 19 years ago

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.

comment:3 by Olly Betts, 19 years ago

Component: otherLibrary API
op_sys: otherAll
rep_platform: OtherAll
Version: other0.8.5

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.

comment:4 by Olly Betts, 19 years ago

Resolution: fixed
Status: assignedclosed

comment:5 by Olly Betts, 19 years ago

Operating System: All
Resolution: fixedreleased

Fixed in 0.9.0

Note: See TracTickets for help on using tickets.