Opened 6 years ago

Last modified 4 years ago

#760 new enhancement

Use lemon %fallback?

Reported by: Olly Betts Owned by: Olly Betts
Priority: normal Milestone:
Component: QueryParser Version: git master
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

Recent versions of the lemon parser generator have a %fallback directive:

https://www.sqlite.org/src/doc/trunk/doc/lemon.html#pfallback

This is potentially useful for handling parsing of operators like AND, OR, NEAR, etc while also allowing parsing of pasted text which might contain these operators as words (especially an issue when FLAG_BOOLEAN_ANY_CASE is used and and, or, near, etc are recognised as operators).

One wrinkle is that it would be useful to hook in and detect when this has happened so we can provide correction suggestions instead, or say the correction has been done but provide a way to undo it. Maybe that can be done by using an intermediate token as the target for %fallback which records the correction that was done?

Change History (1)

comment:1 by Olly Betts, 4 years ago

Type: defectenhancement
Note: See TracTickets for help on using tickets.