#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 , 20 years ago
Severity: | blocker → normal |
---|---|
Status: | new → assigned |
comment:2 by , 20 years ago
comment:3 by , 20 years ago
Component: | other → Library API |
---|---|
op_sys: | other → All |
rep_platform: | Other → All |
Version: | other → 0.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 , 20 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
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.