Thueue

From Esolang
Jump to navigation Jump to search

Thueue is a deque based Thue style esolang. It can too do replacements, however only at the start and end of the string, and only on individual elements. It was created by User:Yayimhere as a simple system for simulation of a Bitwise Cyclic Tag. It is most likely turing complete.

Semantics

Thueue uses the following syntax:

D
1 [x]$ [y]$ <
2 [x]$ [y]$ >
3 [x]$ [y]$ + >
4 [x]$ E$ <
5 [x?]$ [xyz]$ ; ~
.
.
.

the first line is the data string. each symbol in the data string is a "group". each group is separated into []'s. All lines below are replacements. A replacement can only replace a single group but can result in any number of groups. Each replacement takes the form:

Line number group to be replaced$ replacement$ optional special argument and then >, ~ or <

First is the line number, which signifies application order

Then there is the group to be replaced, and the replacement, which is obvious. And last there is the arrows. If going right, the replacements apply to the end of the string, and the left arrow applies the replacements only to the start of the string. And last, if it is the ~, it applies to both ends of the string, with the left one being applied first.

The optional special arguments do the following:

  • + will concat the symbol in front of or behind the replaced string, after the replacement has been applied.
  • ; splits the whole group into individual groups, after applying the replacements.


Last, you may wonder what the E and ? is. The latter is an "arbitrary" and can be any symbol. And the former is the empty string.