Tangle bracket language

A Tangle bracket language is a programming language where brackets can be "tangled," that is, written without being properly nested. In properly-nested brackets, the beginning and end of a "clause" of brackets must enclose a complete sequence. This means that these sequences are properly nested: [] {[]} {[]{}} And these are not: {[}] {([{)}]) (([[)])]

An example of code written in an (ad-hoc) tangle-bracket language is: while x { if y [ doSomething; }    doSomethingElse; ]

In this code, it is assumed that  and   can be used interchangeably, but not equivalently-   and   are equivalent, but   and   are not, since   cannot close.

Due to the confusing, headache-inducing nature of tangle-bracket grammar, no known practical programming languages invoke this convention. As such, the exact behavior of tangle-bracket code is not defined even by convention; however, one interpretation suggests that the above code (assuming there aren't any side effects of  or  ) may be equivalent to: while(x && y) doSomething; if(!x) doSomethingElse;