Open artemp opened 13 years ago
Coming from a lex/yacc background, I gave adding "is null" a try, but apparently utterly fail to grok how Boost Spirit / X3 actually works.
I tried the following variants:
is null
auto const equality_expression_def = relational_expression[do_assign] >
*( ( ( lit("=") | lit("eq") | lit("is")) > relational_expression [do_equal])
* check for `is` followed by `null`
auto const equality_expression_def = relational_expression[do_assign] > *( ( ( lit("=") | lit("eq") | lit("is")) > relational_expression [do_equal])
* check for `is` followed by space followed by `null`
auto const equality_expression_def = relational_expression[do_assign] > *( ( ( lit("=") | lit("eq") | lit("is")) > relational_expression [do_equal])
| (( lit( "!=") | lit("<>") | lit("neq") | (lit("is") >> lit(" ") >> lit("not")) > relational_expression [do_not_equal]) );
but none of this worked out in the way I expected. Scanning over X3 howtos and actual documentation also didn't help much unfortunately. E.g. I'm not able to figure out how tokenization actually happens and whitespace is handled ... old dog, new tricks ... :(
@hholzgra - Thanks for trying! I think you need to add lexeme
directive to avoid skipping. Take a look
@hholzgra as a quick test you could try defining literal like
lit("isnot")
Just to see everything else works as expected
Currently we support
not [field] is {val}
but we don't support[field] is not {val}
. As we added support foris null
(#794) this grows in utility.