nyuuzyou/wikis huggingface dataset:
Every-machine

Every-machine is an esolang and a collaboration by User:Tommyaweosme and User:Unname4798 where it's basically a try on extending the Truth-machine
== Commands ==
V1
 0 print 0 and terminate
 1 print 1 forever
 2 print 22
 3 print hello world
 4 emulate XKCD random number
 5 add together two user inputs
 6 take another input, and output "yay" if the input is 6, otherwise output "aw"
 7 print fizzbuzz up to 70
 8 print "gello world" (credit to truttle1)
V2
 9 ask for another user input.
 90 print 99 bottles of beer on the wall
 91 prints a palindrome code in any language
V2.1
 92 print the source code
 93 ask for another input and print 0 and terminate if input doesn't equal source code, print 1 forever otherwise
V2.2
 10 take another input, if input doesn't equal the current random number (between 0 inclusive and 2025 inclusive), delete Sprunki, else delete this language and ban its creator from all online services
== Interpreters ==
None yet because of the crazy task.
Category:Languages Category:Unusable for programming Category:Unimplemented
EverybodyLang

Add any command you want! (Don't forget updating the implementation!)
==Commands==
H | Prints Hello world
Q | Prints "Q"
9 | Prints 99 bottles of beer
+ | Increment
- | Decrement
< | Move left
> | Move right
, | Get user input(ASCII)
. | Output(ASCII)
; | Get user input as number
: | Output as number
0 | Clear cell
==Implementation==
Assume code is the code.
def ninety_nine_bottles_of_beer():
	print("99 bottles of beer on the wall, 99 bottles of beer.\nTake one down, pass it around,", end = "")
	for i in range(99,0,-1):
		bottle = "bottles"
		if i == 1: bottle = "bottle"
		print("%d %s of beer on the wall.\n%d %s of beer on the wall, %d %s of beer." % ((i,bottle)*3))
		print("Take one down, pass it around, ", end = "")
	print("no bottles of beer on the wall.\nNo bottles of beer on the wall, no bottles of beer.")
	print("Go to store, buy some more, 99 bottles of beer on the wall!")
mem = {}
memc = 0
pc = 0
while pc < len(code):
	cur = code[pc]
	if cur == "H": print("Hello, world!")
	if cur == "Q": print("Q")
	if cur == "9": ninety_nine_bottles_of_beer()
	if cur == "+": mem[memc] += 1
	if cur == "-": mem[memc] -= 1
	if cur == "<": memc -= 1
	if cur == ">": memc += 1
	if cur == ";": mem[memc] = int(input())
	if cur == ":": print(mem[memc])
	if cur == ",": mem[memc] = ord(int(input()))
	if cur == ".": print(chr(mem[memc]))
	if cur == "0": mem[memc] = 0
	pc += 1
Ewpl

ewpl(even worse programming language) is a programming language.
==Language Overview==
This language uses a single cell to store ascii which would be printed out as letters.
==Commands==
* >: prints out the ascii as a letter
* <: prints out the ascii as a letter but with a new line at the end
* +: adds 1 to the cell
* -: subtracts the cell by 1
* ~: adds 10 to the cell
* =: subtracts the cell by 10
* /: prints out the ascii
* \: prints out the ascii but with a new line at the end
* _: resets the cell to 0
==Installation==
# Download Python 3.9
# Download the 'main.py' file from the github repository
# Run python3 [main.py file path] [(optional)code file path]
==Hello, world! program==
 ~~~~~~~++>~~~->+++++++>>+++>_~~~++>~~~~~~~~+++++++>=++>+++>------>=++>_~~~+++>
Category: Languages Category: 2020 Category: Output only Category: Unusable for programming Category:Implemented Category:Total
Exalang

Exalang
a programming language which is the same as ESOPUNK
I used the source code of ESOPUNK, added new features
and no more no less.
more about ESOPUNK
== Syntax ==
the syntax is: instruction x1 .. xn
=== registers ===
you use them as variables, because there's no variables in the language!
* X : a custom register
* T : also a custom register, but changed by the TEST command. used by TJMP and FJMP commands.
* M : a custom register for communication between exas
* F : When an exa hold a file, it's used to read a value from the held file (like accessing array items by index), each time you read, you read the next value, if you write to it, it will change the current value in the file.
=== I/O ===
* #STDI (read only) : read a character from stdin
* #STDO (write only) : write to stdout
* #STDE (write only) : write to stderr
=== list of instructions ===
* COPY a b : sets the value of b (register) to the value of a (number / register)
* ADDI a b c : sets register c to a + b
* SUBI a b c : sets register c to a - b
* MULI a b c : sets register c to a * b
* DIVI a b c : sets register c to a / b
* MODI a b c : sets register c to a % b
* MARK label : marks a label that you can jump to via JUMP instruction.
* JUMP label : continue executing the program from label
* TJMP : if T register == 1 then jump to label
* FJMP : if T register == 0 then jump to label
* more instructions + better explanation -> ESOPUNK
== links ==
* Github (source code and interpreter): https://github.com/M-Programer/exalang
* Syntax and commands + ESOPUNK: ESOPUNK
Category:Languages Category:Implemented
ExampleFuck

ExampleFuck is brainfuck but every command is the name of a popular problem.
It is invented by User:None1.
==Commands==
 Command Table
ExampleFuck 	brainfuck
Hello World 	+
Cat Program 	-
Truth Machine 	>
Quine 	<
Polyglot 	,
Self Interpreter 	.
FizzBuzz 	[
99 Bottles of Beer	]
It is case sensitive, and commands are separated with line feeds.
==Example Programs==
===Cat Program===
 Hello World
 FizzBuzz
 Polyglot
 Self Interpreter
 99 Bottles of Beer
===Hello World===
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
FizzBuzz
Truth Machine
Hello World
Hello World
Hello World
Hello World
FizzBuzz
Truth Machine
Hello World
Hello World
Truth Machine
Hello World
Hello World
Hello World
Truth Machine
Hello World
Hello World
Hello World
Truth Machine
Hello World
Quine
Quine
Quine
Quine
Cat Program
99 Bottles of Beer
Truth Machine
Hello World
Truth Machine
Hello World
Truth Machine
Cat Program
Truth Machine
Truth Machine
Hello World
FizzBuzz
Quine
99 Bottles of Beer
Quine
Cat Program
99 Bottles of Beer
Truth Machine
Truth Machine
Self Interpreter
Truth Machine
Cat Program
Cat Program
Cat Program
Self Interpreter
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Self Interpreter
Self Interpreter
Hello World
Hello World
Hello World
Self Interpreter
Truth Machine
Truth Machine
Self Interpreter
Quine
Cat Program
Self Interpreter
Quine
Self Interpreter
Hello World
Hello World
Hello World
Self Interpreter
Cat Program
Cat Program
Cat Program
Cat Program
Cat Program
Cat Program
Self Interpreter
Cat Program
Cat Program
Cat Program
Cat Program
Cat Program
Cat Program
Cat Program
Cat Program
Self Interpreter
Truth Machine
Truth Machine
Hello World
Self Interpreter
Truth Machine
Hello World
Hello World
Self Interpreter
===XKCD Random Number===
Truth Machine
Hello World
Truth Machine
Hello World
Truth Machine
Hello World
FizzBuzz
Truth Machine
Hello World
FizzBuzz
Cat Program
Quine
Hello World
Hello World
Hello World
Truth Machine
99 Bottles of Beer
Quine
Quine
99 Bottles of Beer
Truth Machine
Self Interpreter
==Turing completeness==
It is Turing complete since brainfuck is.
==Interpreters==
===Python===
import sys
def ef(code):
 s1=[]
 s2=[]
 matches={}
 tape=[0]*1000000
 for i,j in enumerate(code):
 if j=='FizzBuzz':
 s1.append(i)
 if j=='99 Bottles of Beer':
 m=s1.pop()
 matches[m]=i
 matches[i]=m
 cp=0
 p=0
 while cp<len(code):
 if code[cp]=='Hello World':
 tape[p]=(tape[p]+1)%256
 if code[cp]=='Cat Program':
 tape[p]=(tape[p]-1)%256
 if code[cp]=='Polyglot':
 tape[p]=ord(sys.stdin.read(1))%256
 if code[cp]=='Self Interpreter':
 print(chr(tape[p]),end=)
 if code[cp]=='Quine':
 p-=1
 if code[cp]=='Truth Machine':
 p+=1
 if code[cp]=='FizzBuzz':
 if not tape[p]:
 cp=matches[cp]
 if code[cp]=='99 Bottles of Beer':
 if tape[p]:
 cp=matches[cp]
 cp+=1
code=sys.stdin.read()
ef(code.split('\n'))
Category:Languages
Category:Brainfuck derivatives
Category:Brainfuck equivalents
Category:Turing complete
Category:Implemented
Category:Thematic
Excela

excela represents a paradigm of relative programming. Everything in excela is variable. Surprisingly, it's Turing-complete. Because excela is a complex language, versions are complex numbers. 
The name "excela" has its origin in "Microsoft Excel", which the language resembles. It shares the file suffixes .xls and .doc, too.
==Grammar==
A program consists of a set of Ruby assignments. Internally excela repeatedly performs all the assignments in an unspecified order, as long as something is changing.
==Uses==
* Distributed algorithms.
* Obfuscation for describing GUIs; excela is an ideal language for this.
* Solving equations by iterative methods.
==Hello world==
In a normal language:
 puts "Hello world"
In excela:
 #helloworld.doc
 i=126207244316550804821666916
 j=10
 #helloworld.xls
 Output[Output[j] ? 1000 : j],i=i%256,i/(Output[j] ? 1 : 256)
 j= j+((Output[j] && i!=0) ? -1 : 0)
==Not so esoteric==
The language excela is still not too obfuscated. Proof of this is this excela interpreter in excela:
 #excela.doc
 value=eval(IO.read(ARGV[1])) 
 rulez=IO.read(ARGV[0]).split("\n")
 c={}
 #excela.xls
 chg= rulez.inject(nil){|r,w| r||(c[v]!=(c[v]=eval(v))) } ? chg : !chg
And in Ruby:
#this version -3+6i is public domain
#!/usr/bin/ruby
include Math #to sin without math
 class Inputer #class which reads input
def initialize() @ar=[] end	
def [](a) (@ar<<STDIN.getc while a>=@ar.size ); @ar[a] end #define operator
	end			#end class
	class Outputer #class which writes output
def initialize() @ar=[] @op=0	end	#end def
def [](a) @ar[a] end	#end def
def []=(a,v) raise "CRITICAL ERROR trying to ReWrItE oUtPuT" if a<@op
@ar[a]=v;((STDOUT.putc @ar[@op];@op+=1)while @ar[@op]) end	
	end			#end class
value=eval(IO.read(ARGV[1])) # get value of file in $
Ring=binding #one ring to bind them all 
Rulez=IO.read(ARGV[0]).split("\n") #excela rulez
Input=Inputer.new ; Output=Outputer.new ;change=0
	while change #we are applying rules while we are changing anything
change=false #we didnt change anything yet
		Rulez.each(){|r|#we didnt change anything yet when we are trying to apply rule r
	begin raise "CRUCIAL ERROR -not assigned" if !(/(.*[^!=<>])=[^=]/===r)
rb=eval("["+$1+"]",Ring) ; eval(r,Ring) ; change||=(eval("["+$1+"]",Ring)!=rb) #and here we perhaps noticed that we changed something	 	 
	rescue puts "something bad with #{r}" #syntax or other error
		end } end
==External resources==
* (Sadly the implementation has not been archived.)
* 
Category:Languages
Category:Unknown year
Category:Turing complete
Category:Implemented
Excellang

Excellang /'eksəlæŋ/ is an esolang invented by User:None1, that uses .xlsx, .xls or .csv tables as programs. A while after creating, the author thought this was a pretty stupid idea, but he still continued it.
==Execution==
Excellang uses threads, the threads can contain data (an unsigned unbounded integer).
==Commands==
Every cell contains a string, which is the command, if the command is invalid, it is ignored. Making a thread going out of bounds errors.
We use (x,y) to represent the y-th cell at the x-th row.
The x's and y's in commands should be replaced with an unbounded unsigned integer. Commands are case-insensitive.
 
Do nothing.
 start
Create a thread at current cell, at the start of program, an interpreter searches the start commands and execute them, then replace the start commands with empty strings.
 create x y
Create a thread at (x,y), facing right, containing data of current thread.
 add x
Add x to data of current thread.
 sub x
Subtract x from data of current thread, subtracting from 0 results in 0.
 mul x
Multiply x with data of current thread, then store the result into data of current thread.
 sum
Let the data of this thread be the sum of data of the threads directly created by this thread.
 pro
Let the data of this thread be the product of data of the threads directly created by this thread.
 out
Output the data of this thread as integer.
 inp
Input the data of this thread as integer.
 cout
Output the data of this thread mod 256 as ASCII.
 cinp
Input the data of this thread mod 256 as ASCII.
 addt x
Add the data of x-th thread it created to data of current thread.
 subt x
Subtract the data of x-th thread it created from data of current thread, subtracting from 0 results in 0.
 mult x
Multiply the data of x-th thread it created with data of current thread, then store the result into data of current thread.
 hif
If data is 0, face thread to left, otherwise right.
 vif
If data is 0, face thread to up, otherwise down.
 up/down/left/right
Let the thread face up/down/left/right.
 stop
Stop a thread.
==Examples==
===HI===
start	add 72	cout	add 1	cout	stop
===Truth Machine===
 	right	out	stop
start	vif 	 	
 	right	out	left
Category:Languages
Category:2024
Execline

execline is a scripting language designed to provide an alternative paradigm for shell scripts.
== Introduction ==
Quoting ,
execline is the first script language to rely entirely on chain loading. An execline script is a single argv, made up of a chain of programs designed to perform their action then exec() into the next one.
An implementation of execline consists of several dozen independent programs. Each program should be installed to the shell path, so that invoking a builtin execline command is done by running the corresponding program.
== Examples ==
A quine by Paul Jarc using echo to emit code:
 #!/command/execlineb -P
 define e "#!/command/execlineb -P
 define e ${q}${E}${q}
 export E $e
 define q ${b}${q}
 define b ${b}${b}
 importas E E
 echo $e"
 export E $e
 define q \"
 define b \\
 importas E E
 echo $e
A quine by Sertonix using only execline commands:
 #!/bin/execlineb
 export \# 1
 define 1 "#!/bin/execlineb
 export ${b}# 1
 define 1 ${q}${1}${q}
 export 1 $1
 define q ${b}${q}
 define b ${b}${b}
 importas 1 1
 export 1 $1
 dollarat"
 export 1 $1
 define q \"
 define b \\
 importas 1 1
 export 1 $1
 dollarat
Category:Implemented
Category:2013
Execoil

Execoil is an esolang by User:BoundedBeans inspired by Underload and _. The code is a stack, kind of like _, but unlike _, it is a stack of strings rather than a stack of characters like _.
==Storage==
Execoil has only one data storage space: the stack. The code is the original stack contents, with the later lines being popped first. Any line of the code not containing exclusively digits is treated as a comment and is not added to the stack.
==Execution==
Execution starts at the bottom of the stack, on the first character. It continues executing commands in the string, from left to right. Once the string has been executed, it is NOT deleted and rather stays below the pointer, and the pointer moves to the next string. In the case that the current string is deleted, the pointer moves to the next. Once the pointer reaches the end of the stack, it moves back to the bottom of the stack. The program halts when the stack is empty, either through the only element popping itself, or the only element deleting itself. The program also halts if it encounters an empty string. If there is only one element, it executes over and over until another element is added or a halt condition is met.
==Commands==
 0 - no-op
 1 - pop and discard an element from the stack
 2 - delete the currently executing string
 3 - push "0" onto the stack. Mainly useful for later concatenation
 4 - save everything after the 4, push it onto the stack, and delete the currently executing string
 5 - save everything after the 5, concatenate it to the end of the top stack element, and delete the currently executing string
 6 - save the whole current string, push it twice onto the stack, but don’t delete it
 7 - remove the first and last digit of the top item
 8 - pop the top item off, output it
 9 - skip the next command, depending on it, execute something else
 91 - input a string, push onto the stack, but remove all non-numbers
 92 - reverse the stack, placing the pointer at the place where the string now is
 93 - if the top string has 0, 1, or 2 characters, skip the pointer to the next string
 94 - "eat" the top string, appending it to the current one and placing an empty string in its place
 95 - pop the top string, append it to all strings
 96 - pop the top string, go through every string and replace the contents of that top string with "0"
==See also==
* Sugueziume, the sequel
* Underload, a language with a similar idea of executing memory to process it
* _, another language with the stack as the code
Category:Self-modifying
Category:Languages
Category:Stack-based
Category:Unimplemented
Exotic

Exotic is an esolang invented by User:Hakerh400 in November 2020.
== Overview ==
Exotic is a tree-rewriting language. It starts with a finite binary tree and modifies it according to some rules.
An expression can be one of the following:
* Term - Represented by .. It is a unique value and contains no other expressions. It represents a leaf in the binary tree.
* Pair - Represented by (left right) where left and right are some other expressions. It represents a node in the binary tree.
* Identifier - Represented by an alphanumeric string. It represents formal variable that can be any expression.
* Call - Represented by *target where target is some other expression. It represents a rule application.
A rule consists of two expressions. The first expression represents the pattern and the second expression represents the replacement for that pattern. For example, the following rule
 (. (a .)) (. a)
will replace anything of the form (. (a .)), where a can be any expression, with (. a). The replacement happens only when the expression appears inside a call (prefixed by *).
We do not explain too much details here. For more information, see the implementation of the interpreter.
== I/O format ==
Input and output are binary strings. There is a bijection between binary strings and binary trees, but the mapping is a bit complicated, so we do not explain here in details how it works (see the implementation). Basically, given the input as a binary string (call it input), the initial expression to start with will be
 *(. inputTree)
where inputTree is obtained by converting input into a binary tree. This is the main expression and the interpreter searches for *expr patterns and matches them against rules (applies the most specific rule if multiple rules can be applied) until there are no more calls in the main expression. The result is the output of the program. Then we convert it back into a binary string and output it.
== Examples ==
=== Cat program ===
 (. a) a
 a .
=== Truth machine ===
 (. (. .)) (. .)
 (. ((. .) .)) *(. ((. .) .))
 a .
=== Replace leading 1 with two 0s ===
If the input consists of a single 1 followed by zero or more 0s, then replace 1 with two 0s.
 a .
 (. .) .
 (. (a b)) (. *(. a))
== Interpreters ==
Interpreter
Category:Languages
Category:Turing complete
Category:Implemented
Category:2020
Exp

Exp (short for "Expression") is an esoteric programming language based on expressions, created by User:PythonshellDebugwindow.
==Instructions==
Instruction	Meaning
< 	Open expression
> 	Close expression
{ 	Print the ASCII value of the expression/variable inside this pair of curly braces
} 	See above
{{ || Print the integer value of the expression/variable inside this double pair of curly braces
|-
| }}	See above
@ 	Sets the variable to the right to the result of the previous expression (the accumulator is the only variable)
~ 	The accumulator variable; can be used with @, put inside {} or {{}}, or used in an expression
Each {...} and {{...}} must be on its own line. They cannot be nested. Lines can be blank; non-blank lines must contain either {...} or {{...}}.
==Expressions==
Expressions are defined by < and >. Empty expressions (with no values) are invalid. Values in expressions can be represented by adding the appropriate amount of ^s between 2 |s, e.g. 5 would be represented as |^^^^^|; you could also add no ^s for the value to become 0. You could also use the accumulator's value by using ~ instead of |value|, or a user input character by using I. Values are separated by operations, which are + (addition), - (subtraction), x (multiplication), and / (division). Instead of using the order of operations, operations are read from left-to-right, and there are no parentheses.
==Spaces==
Spaces can only appear beside operators, <, >, or other spaces.
==Examples==
==="HELLO WORLD"===
{<|^^^^^^^^^| x |^^^^^^^^|>}
{<|^^^^^^^^^^| x |^^^^^^^| - |^|>}
{<|^^^^^^^^^| x |^^^^^^^^| + |^^^^|>}
{<|^^^^^^^^^| x |^^^^^^^^| + |^^^^|>}
{<|^^^^^^^^^^| x |^^^^^^^^| - |^|>}
{<|^^^^^^^^| x |^^^^|>}
{<|^^^^^^^^^^| x |^^^^^^^^^| - |^^^|>}
{<|^^^^^^^^^^| x |^^^^^^^^| - |^|>}
{<|^^^^^^^^^^| x |^^^^^^^^| + |^^|>}
{<|^^^^^^^^^| x |^^^^^^^^| + |^^^^|>}
{<|^^^^^^^^^^^^^^^^^| x |^^^^|>}
===Cat program (1 character)===
{<I>}
===Add two inputs===
More complicated than it needs to be, but it shows off the accumulator. Takes inputs as ASCII characters, outputs an integer.
{{<I>}}@~
{{<~ + I>}}@~
{{<~>}}
Note that the following program is equivalent:
{<I>}@~
{<~ + I>}@~
{{<~>}}
==External resources==
* interpreted in python by User:Nmcassa
* An interpreter on GitHub written in Node.js
Category:Languages Category:2019 Category:Implemented Category:Total Category:Finite state automata Category:Unusable for programming
Expansion

==Syntax==
 source_string1=target_string1
 source_string2=target_string2
 ...
 source_stringn=target_stringn
 *memory_string
Every source string must be surrounded by square brackets, and except the beginning and the end, there must be no square brackets, that means:
 []
 [a]
Are valid source strings, but:
 [
 a]
 ]]
 [b]c]
 []]
Are invalid source strings.
The only memory is the memory string, then, each turn, every substring surounded by brackets is replaced with the replacements, for example:
 [b]=[a]
 [a]=b[a]
 *[a][b][c]
The memory string is initially [a][b][c], but will become b[a][a][c] in the first turn.
When no replacements can be performed, execution stops and the memory string is printed.
==Examples==
===Hello, World!===
 *Hello, World!
===Truth Machine===
 [1]=1[1]
 [0]=0
 *[input]
You replace input with the input (0 or 1), actually, this doesn't print anything (because the program never halts) when input is 1, but appends 1 to the memory string infinitely.
===A+B Problem===
[0 0]=0
[0 1]=1
[0 2]=2
[0 3]=3
[0 4]=4
[0 5]=5
[0 6]=6
[0 7]=7
[0 8]=8
[0 9]=9
[1 0]=1
[1 1]=2
[1 2]=3
[1 3]=4
[1 4]=5
[1 5]=6
[1 6]=7
[1 7]=8
[1 8]=9
[1 9]=10
[2 0]=2
[2 1]=3
[2 2]=4
[2 3]=5
[2 4]=6
[2 5]=7
[2 6]=8
[2 7]=9
[2 8]=10
[2 9]=11
[3 0]=3
[3 1]=4
[3 2]=5
[3 3]=6
[3 4]=7
[3 5]=8
[3 6]=9
[3 7]=10
[3 8]=11
[3 9]=12
[4 0]=4
[4 1]=5
[4 2]=6
[4 3]=7
[4 4]=8
[4 5]=9
[4 6]=10
[4 7]=11
[4 8]=12
[4 9]=13
[5 0]=5
[5 1]=6
[5 2]=7
[5 3]=8
[5 4]=9
[5 5]=10
[5 6]=11
[5 7]=12
[5 8]=13
[5 9]=14
[6 0]=6
[6 1]=7
[6 2]=8
[6 3]=9
[6 4]=10
[6 5]=11
[6 6]=12
[6 7]=13
[6 8]=14
[6 9]=15
[7 0]=7
[7 1]=8
[7 2]=9
[7 3]=10
[7 4]=11
[7 5]=12
[7 6]=13
[7 7]=14
[7 8]=15
[7 9]=16
[8 0]=8
[8 1]=9
[8 2]=10
[8 3]=11
[8 4]=12
[8 5]=13
[8 6]=14
[8 7]=15
[8 8]=16
[8 9]=17
[9 0]=9
[9 1]=10
[9 2]=11
[9 3]=12
[9 4]=13
[9 5]=14
[9 6]=15
[9 7]=16
[9 8]=17
[9 9]=18
*[A B]
Replace A and B to the two numbers you want to add, they must be one-digit.
===Print 1048576 A's===
[0]=A
[1]=[0][0]
[2]=[1][1]
[3]=[2][2]
[4]=[3][3]
[5]=[4][4]
[6]=[5][5]
[7]=[6][6]
[8]=[7][7]
[9]=[8][8]
[10]=[9][9]
[11]=[10][10]
[12]=[11][11]
[13]=[12][12]
[14]=[13][13]
[15]=[14][14]
[16]=[15][15]
[17]=[16][16]
[18]=[17][17]
[19]=[18][18]
*[19]
==Implementations==
===Python===
import sys,re
code=sys.stdin.read().strip().split('\n')
memstr=code.pop()[1:]
rules={}
def replacement(x):
 t=x.string[slice(*x.span())][1:-1]
 if t in rules:
 return rules[t]
 return x.string[slice(*x.span())]
for i in code:
 if not re.match('\\[[^\\]]*?\\]=(.*)',i):
 raise SyntaxError('Invalid code')
 beg=i[i.find('[')+1:i.find(']')]
 end=i[i.find('=')+1:]
 rules[beg]=end
while 1:
 if not re.search('\\[.*?\\]',memstr):
 print(memstr)
 break
 memstr=re.sub('\\[.*?\\]',replacement,memstr)
 #print(memstr) # Decomment this line to see memory string
==See also==
* Thue
Category:Languages
Category:2024
Category:String-rewriting paradigm
Category:Output only
Category:Implemented