This is a C++ project of a command-line processor of John Colagiola’s Thue programming language.
thue [-cdlnr] [-S U] [-s N] FILE
thue [-h | --help]
thue [-V | --version]
The program reads and processes the Thue code in FILE
; it reads the input from stdin
and prints the output in stdout
.
By default it follows the convention on newlines in the code proposed by Laurent Vogel.
-c
- leave CR at EOL as is
-d
- enable the debug print
-l
- enable the Left mode: priority given to the leftmost match
-n
- disable the feature to print a newline by rules of form
...::=~
-r
- enable the Right mode; priority given to the rightmost match
-S U
- specify
U
as a random seed -s N
- stop after
N
steps at most -h
,--help
- print the help
-V
,--version
- print the version
See the test code in files of name test/*.t
.
- test/incr.t
- read a binary number, increment it, and print the result
- test/quine.t
- a Quine
- test/seq.t
- print an initial segment of the Thue-Morse sequence
Takeshi Abe <tabe@fixedpoint.jp>
The MIT license