Let's Rewrite String!

From Esolang
Jump to navigation Jump to search

Let's Rewrite String! is an esolang by User:ChuckEsoteric08 inspired by Novice

Specification

The language has unbounded string memory, which initial value is set to user input. Anything that isn't a command would declare label with that name.
There are Two commands in the language:

x=y

If string contains x and there exist label x, then x would be replaced with y and IP jumps to label x

x-y

Works the same but it would also print y if statement is true.

Computational class

Let's Rewrit String! is Turing-complete, proven by existence of Cyclic tag system interpreter in it:

$
'0
`0
#
^;-;^
^0-0^
^1-1^
^@-@
^;
@0=@
@1=@
@0
@1
$=$
^0
@='
'
'1=@1
'0=@0
'1
#=0#
^1
@=`
`1=@1
`0=@0
`1
#=1#
@
'='
`=`
^@
@#=@#
$=$^
@#

Initial String would look like this: $^Program@Data#