Better atom divider regex; remove incorrect local use user/miker/qp-curlys
authorMike Rylander <mrylander@gmail.com>
Wed, 13 Nov 2013 23:15:21 +0000 (18:15 -0500)
committerMike Rylander <mrylander@gmail.com>
Wed, 13 Nov 2013 23:15:21 +0000 (18:15 -0500)
commitde4708b4899af3f95791c972e782c9a01fc44a44
tree6b54d6ade336c48f578563190614f1bc2a9fa5fd
parent4da378fda14446fa279f693d758eef7e5597b1e2
Better atom divider regex; remove incorrect local use

First, we didn't need to make $last_type local, and it broke explicit
grouping anyway.  That's removed.

Second, we are smarter about finding the boundary of atoms.  Previous
to this commit, and curly brace could send the parser into a tailspin
from which it would not recover.  Now we use alternation instead of
a character class, which is much safer with the default multi-character
float syntax specifier.

Third, as a catch-all, if we can't parse the remained of a query we
now simply say so (when in debug mode) and go away, instead of risking
an infinite loop.  We do this via a final, unqualified "else" clause
in decompose().

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/QueryParser.pm