SIMPLE (preprocessor)

From Esolang
Jump to: navigation, search

SIMPLE is a text preprocessor created by David Madore in 1998, inspired by m4. SIMPLE got its name from the joke language SIMPLE.

SIMPLE has special syntax to expand a function parameter with each of its tokens quoted, which is necessary to be able to define functions that take a parameter by reference. Just like TeX, SIMPLE works on a list of tokens, so can have individual tokens quoted, or every token in a token string quoted, but not expressions quoted as a whole. Quoting a token string multiple levels involves blowing its size up exponentially. SIMPLE is thus based on the leaning toothpick syndrome, in which every time you refer to a parameter in a function definition, you have to decide how many times deep you want to quote that argument to make sure that everything gets evaluated at the right time. Too few or too many and your program won't work.