txt: text exchanging thing (pending name)


Program


Input


output area

whuh?

txt is an idea that i had synthesized in my mind after learning about multiple rewriting languages such as tote, thue, etc.

Programs are currently notated via Rules and Input.
A Rule is a list of Assertions and Changed, delimited by a > sign.
A single Assertion, Change, or Input Register is defined as a single character, followed by the contents to be found or replaced. ? are broken by spaces.

Here is a simple example.

ab > ac rt

ab

a is initialized with the string "b", and the rule states that if a "b" is found in a; it should be replaced with "c", and r should be prepended with "t".

Whenever a rule is applied, the program will go back to the beginning and try every rule again until none can be applied (or, in this implementation, when 10000 pass throughs have occurred.).

Comments can be inserted by starting a line with #.


ok but why

The real power of txt is:

Coming soon:


Examples

# rot13

_0A > _N0
_0B > _O0
_0C > _P0
_0D > _Q0
_0E > _R0
_0F > _S0
_0G > _T0
_0H > _U0
_0I > _V0
_0J > _W0
_0K > _X0
_0L > _Y0
_0M > _Z0
_0N > _A0
_0O > _B0
_0P > _C0
_0Q > _D0
_0R > _E0
_0S > _F0
_0T > _G0
_0U > _H0
_0V > _I0
_0W > _J0
_0X > _K0
_0Y > _L0
_0Z > _M0

_0 >
,
_0EXAMPLESTRING

# proquint parser, adapted from devine lu linvega

_c0000 o$ > ob$
_c0001 o$ > od$
_c0010 o$ > of$
_c0011 o$ > og$
_c0100 o$ > oh$
_c0101 o$ > oj$
_c0110 o$ > ok$
_c0111 o$ > ol$
_c1000 o$ > om$
_c1001 o$ > on$
_c1010 o$ > op$
_c1011 o$ > or$
_c1100 o$ > os$
_c1101 o$ > ot$
_c1110 o$ > ov$
_c1111 o$ > oz$
_v00 o$ > oa$
_v01 o$ > oi$
_v10 o$ > oo$
_v11 o$ > ou$
_*- o$ > o-$

o$ > o
,
_cvcvc*cvcvc0000110001101110-0110111011001100
o$