I am looking for (feedback from) potential users of an open source
library for Java and JavaScript, called myPatterns, implementing a
new concept: pattern matching in "custom notations".

What are custom notations?

Everyone knows pattern matching of strings using regular expressions.
myPatterns implements a more general notion of pattern matching:
- working not only on strings, but on any program data: numbers,
objects, collections, etc.
- using patterns written either in a pre-defined notation, subsuming
regular expressions and JSON, on in user-defined notations.

When designing a class API, programmers using this library can also
design very easily a custom syntax for matching objects of that class,
i.e. for selecting objects of a certain shape, and decomposing them
into smaller pieces.

For more details, see custom notations



A balance method for red-black trees can be written very concisely
using a custom notation in which a red-rooted tree is written
"(left label right)" and a black-rooted tree is written
"[left label right]":

Java Code:
static final String pats[] = {"[((%a %x %b) %y %c) %z %d]",
                              "[(%a %x (%b %y %c)) %z %d]",
                              "[%a %x ((%b %y %c) %z %d)]",
                              "[%a %x (%b %y (%c %z %d))]"};

rbTree balance() {
    Subst s = Matchbox.matchAny(this, pats);
    if(s != null)
        return new rbTree(red, 
                          new rbTree(black, (rbTree)s.get('a'), 
                                     (Integer)s.get('x'), (rbTree)s.get('b')), 
                          new rbTree(black, (rbTree)s.get('c'), 
                                     (Integer)s.get('z'), (rbTree)s.get('d')));
    return this;