Tear-Insert-Fold grammars