Thue Interpreter
Output:
No output yet.
Current State String:
State will be shown here.
Status:
Ready
About Thue:
Thue is an esoteric programming language based on the non-deterministic rewriting of a string. A program consists of a list of substitution rules and an initial state string. The interpreter repeatedly finds a substring that matches the left-hand side of a rule and replaces it with the right-hand side, until no more rules can be applied.
Rule Syntax:
Rule Format | Description |
---|---|
lhs::=rhs | Standard Rule: Replaces an occurrence of lhs with rhs . |
lhs::=~output | Output Rule: Sends output to the output stream and deletes lhs . |
lhs::=::: | Input Rule: Replaces lhs with a line from the input stream. |
::= | Terminator: Separates the list of rules from the initial state string. |