This project has moved. For the latest updates, please go here.

"Optional" operator?

May 23, 2014 at 3:22 PM
I'd like to create a simple...ish... language for tag searching. I'd like it to look something like
"basket (kitten | puppy) !( couch | spigot )" (making the "missing" operators logical AND as it's the expected outcome when just typing tags as a list)

So far I haven't really accomplished much - I wasn't able to find much information on making the unary operator work on any expression or how to actually use MakeListRule etc. and am
sort of "lost".

Hoping someone can help :)
May 27, 2014 at 6:42 PM
start with FullTextSearchGrammar sample - the input query language is similar to what you have, and there's an implicit "AND" operator there
May 27, 2014 at 6:51 PM
Thanks, and yeah, had a look at it. I ran into trouble with the ImpliedSymbolTerminal not having an AST node type(or something like that- it's very hard to get a decent idea of what's wrong sometimes.)

My current solution is making a "list" node with sub-expressions in it, which I can treat as an 'and' later on. Not sure if there are any practical differences?