This esolang is not a push-down automata
A stack, eight commands and no way to jump, so it is less than the push-down automaton its name denies.
None1, 2023 · Turing complete: no · ●○○ easy · esolangs.org
Tested with 6 known programs · Test method
Run it
The idea
None1 made this language, TEI for short. There is one stack of numbers and the program runs once from left to right. There are no loops and no jumps, so every program stops after as many steps as it has characters.
Read the story
The trick is that every character which is not a command pushes its own code. H! pushes 72 and prints it as H. Writing text is easy; only digits and the command characters themselves have to be computed.
The machine
| Char | Does |
|---|---|
0 to 9 | Push the digit |
+ - * | Pop a, then b; push b+a, b-a, b*a |
, ? | Push a number read from the input; push one input character's code |
. ! | Pop and print as a number followed by a space; pop and print as a character |
| anything else | Push its own code |
Example
The ! at the end of the Hello World is made as 1+8*4.
The ! at the end of the Hello World is made as 1+8*4.
The specification also notes that a postfix sum of one-digit numbers, such as 23*4+., is a program that prints its value. That one prints 10.
Ideas it shows
See also
Also in Turing tarpits
Write your own in Run Convert a program from This esolang is not a push-down automata
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: this-esolang-is-not-a-push-down-automata.
Command line
shib run this-esolang-is-not-a-push-down-automata -e '?!' --input 'x'shib manual this-esolang-is-not-a-push-down-automataSource
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org