Esolang: DOESNT

It was inspired by FORTY-FOUR ESOLANGS's Language 18: "a program only states what it doesn't do".

DOESNT is an esoteric programming language based in single string rewriting. In a normal rewriting system, rules specify what they want to consome. However, rules in DOESNT specify prefixes they will not take. For example:

give taken unless a , b , taken ;
have a b c d e ;

It will produce the following output:

---: a b c d e
001: a b taken

Each rule will attempt to take the longest prefix it can before hitting something it DOESNT accept. So, rule 001 rejects a ..., b ..., and taken .... Thu, it's allowed to consume c d e, replacing it with taken.

Loosely inspired by Prolog, DOESNT features the !! (bail) operator. When a prefix is marked with !! is encountered, the rule will immediately fail allow the next rule to start. This ability allows for strongly sequencing rules in DOESNT.

I believe it is also required to make DOESNT Turing complete?

The Turing completeness of DOESNT is unknown.

Basic Example Programs

Addition

I initially thought this was impossible in DOESNT. However, adding !! to the language enabled it's expression.

give a + 
unless b , a , + . !! , + b b , + b . , . ;

give
unless a , b , + b , . , + . ;

have a a a a + b b b . ;

Bouncing Cursor

give <& .
unless @ , * , . , &> * !! ;

give @ &>
unless * , . , <& , @ <& * , @ * !! , @ &> !! , &> , * &> !! ;

give * &>
unless @ , * , . , &> * * , &> . !! , &> * . ;

give * *
unless * * * , * * . , * . !! , . , <& , * <& !! , * * <& !! 
     , @ , &> , * &> !! ,  * * &> ;

give *
unless * * , * . , . , * <& !! , <& , @ , &> , * &> ;

give . 
unless * , <& , @ , &> ;

give <& *
unless <& , * <& * , * <& . , &> , @ ;


have @ * * * * <& . ;

Symbolic Fizzbuzz

Every second rewrite is the current number. You have to count yourself sorry.

give 1f
unless 
      1f BUZZ , 2f BUZZ , FIZZ BUZZ
    , 1f 0b , 2f 0b , FIZZ 0b 
    , 1f 1b , 2f 1b , FIZZ 1b 
    , 1f 2b , 2f 2b , FIZZ 2b 
    , 1f 3b , 2f 3b , FIZZ 3b 
    , 1f 4b , 2f 4b , FIZZ 4b
    , BUZZ , 1b , 2b , 3b , 4b
    , 1f , 2f ;

give 2f
unless 
      1f BUZZ , 2f BUZZ , FIZZ BUZZ
    , 1f 0b , 2f 0b , FIZZ 0b 
    , 1f 1b , 2f 1b , FIZZ 1b 
    , 1f 2b , 2f 2b , FIZZ 2b 
    , 1f 3b , 2f 3b , FIZZ 3b 
    , 1f 4b , 2f 4b , FIZZ 4b
    , BUZZ , 1b , 2b , 3b , 4b
    , FIZZ , 2f ;

give FIZZ
unless
      1f BUZZ , 2f BUZZ , FIZZ BUZZ
    , 1f 0b , 2f 0b , FIZZ 0b 
    , 1f 1b , 2f 1b , FIZZ 1b
    , 1f 2b , 2f 2b , FIZZ 2b 
    , 1f 3b , 2f 3b , FIZZ 3b 
    , 1f 4b , 2f 4b , FIZZ 4b
    , BUZZ , 1b , 2b , 3b , 4b
    , 0f , FIZZ , 1f ;

give 1b
unless 1b , 2b , 3b , 4b 
    , FIZZ , 0f , 1f , 2f ;

give 2b
unless BUZZ , 2b , 3b , 4b 
    , FIZZ , 0f , 1f , 2f ;

give 3b
unless BUZZ , 1b , 3b , 4b 
    , FIZZ , 0f , 1f , 2f ;

give 4b
unless BUZZ , 1b , 2b , 4b 
    , FIZZ , 0f , 1f , 2f ;

give BUZZ
unless BUZZ , 1b , 2b , 3b 
    , FIZZ , 0f , 1f , 2f ;

have 1f 1b ;

DOESNT Poem

Inspired by the Modal postcard.

have what is DOESNT? ;

give DOESNT is an esolang
unless DOESNT , is , an , esolang 
     , a , rewriting , system 
     , that , which , what is left !! , not , taken 
     , where , everything , backwards 
     , it , left , untaken , DOESNT. ;

give a rewriting system
unless DOESNT , is , what is left !! 
      , a , rewriting , system , where , everything , backwards 
      ,  it , left , untaken , DOESNT. ;

give where everything is backwards
unless DOESNT is an !! , what is left !! 
     , where , everything , is , backwards , 
     , it , left , untaken , DOESNT. ;

give it is what is left untaken
unless DOESNT , is , an , esolang , a , rewriting , system
     , it , what , left , untaken , DOESNT. ;

give DOESNT.
unless DOESNT. , what , is , DOESNT? 
     , DOESNT , an , esolang , a , rewriting , system 
     , where , everything , backwards ;

Observations from Writing DOESNT

Writing DOESNT is obtuse. It feels almost impossible to truly plan ahead in the language. Instead you model each rule bit by bit based after observing the output. I think it does live up to the feeling of sculpting a program.

I'm not sure what more complex computaitons would be like in DOESNT. I'm not even sure if this system is Turing complete. There are some programs I'm not sure will halt, instead looping forever in the same states. Additionally, the number of symbols rules need to mention rapidly explodes.

Programs leave much unsaid. The list of things a program DOESNT do is far long than the list of things it does do.

Implementation

Implementation of DOESNT in LuaJIT (show raw)