1. Case with "+" as part of term, for ex: test+
The problem here is that SearchGrammar treats "+" always as operator, and what is wanted is to treat it part of search term - when there's no space in between.
Note that this MIGHT be confusing for the user; the following two expressions will have different meaning:
one+ two //search for text with "one+" AND "two"
one + two // search for "one" AND "two"
Now how to do this. Notice, I take back my previous recommendation in prior response, disregard it)
To implement this, just add "+" sign to character lists in term's declaration, in a call to identifier, in CreateTerm method:
var term = new IdentifierTerminal(name, "!@#$%^*_'.?-+", "!@#$%^*_'.?0123456789+");
notice "+" at the end of both lists.
I think that should do it
2. For unmatched quote, that might be tricky. Again, disregard my previous recipe, there's currently a bug that prevents you from setting precedence on key terms, so that would not work as described. So define a single quote as a term, add it to PrimaryExpression.Rule
PrimaryExpression.Rule = unmatchedQuote | Term | ...;
Also register unmatchedQuote as punctuation (to eliminate after parsing):
Then set the priority of Phrase (quoted string) to lowest:
Phrase.Priority = Terminal.LowestPriority;
that should work then.