From Esolang
Jump to navigation Jump to search
Not to be confused with ->.
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.

is a nondeterministic string-rewriting esolang by User:Fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.

Syntax and semantics

A → program is made up of one or more substitutions, which take the form

patternreplacement 

Note that -> can be used instead of .

The only characters allowed in the patterns and replacements are alphanumeric characters, and dollar signs. All horizontal whitespace is ignored, while newlines are used to separate substitutions. Comments may be included, running from # to the end of the line.

Code execution

A → program is run line by line replacing patterns with their corresponding replacements in the datastring. When a replacement occurs, the program jumps back to the first line. The program starts at the start. If no substitutions occur, the program ends. The datastring begins as a dollar sign, followed by a random combination of alphanumeric characters.

Special rule forms

There are some exceptions to the syntax rules, allowing other characters to be included in the rules. The pattern may be .* (matches everything), or it may begin with ( (only matches front), and it can end with ), (only matches back). The replacement may include a . followed by a number, which outputs the character associated with that Unicode codepoint. It can also include a @, which halts the program when the replacement is matched

Examples

Hello, World!

a   → .72 .101 .108 .108 .111 .44 .32 .87 .111 .114 .108 .100 .33 @ 
.*  → a
# This program prints "Hello, World!"

Looping counter

Here is one which uses actual computation.

($A   → 
$A    → aX$
X$)   → G$X.10
X     → 
G     → 
E$    → $A.42
a$    → EE$
.*    → a$