Tokens whose first characters are used by another token, are not usable anymore
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Booleano |
Fix Committed
|
High
|
Gustavo Narea |
Bug Description
For example, if the equality token is "is" and the not equality token is "is not", then the later won't be usable because it'd be matched as <equality> <Variable "not">, which will cause a parse error when the actual right-hand operand is found.
I think there are three possible solutions:
1.- Attempt to resolve this at the Pyparsing grammar-level (very unlikely, I think).
2.- Reject these tokens as they as set (which would affect performance).
3.- Check this in the parser's test utilities module, so users can be aware of this problem and fix it without affecting the performance of their applications on deployment.
Unfortunately, rearranging the operators is not a valid solution because there are several precedence levels. This is, defining the tokens from longer to shorter will only work for operations that have the same precedence.
Related branches
description: | updated |
Changed in booleano: | |
milestone: | 1.0a2 → 1.0a1 |
Fixed in r165, at least among membership and relational operations. For the rest of the operations, the following blueprint will fix it: /blueprints. launchpad. net/booleano/ +spec/fully- customizable- operations
https:/