MITLML

From Esolang
Jump to navigation Jump to search

MITML stands for More Interesting Thue-like Meta-language. It was created to define languages at ease, sort of like BNF, only for the 21st century user. It builds on the idea of BNF, but uses some peculiar commands like ¬, ~, |, !. If someone implements MITML, I will either give them 67 chocolate bars or cry.

Example

~ = ¬ '.' ^ str ` ( $ ^ str

That was a simple MITML definition which is, in simple MITML (SMIMTL), this:

If input is a dot followed by element of type str, output element str.

Simple!

~ = ¬ '~' ` ( $ ~

Definition

~ is input. You can have multiple inputs. For example:

~ = ~(2) ` ( $ ~(2)

^ is element. Let's call our input a. We will do the python a.split(" "). If you don't python, it means we just get a, cut it into pieces which are before and a space. Or it can be defined as a bit of something. Lets expand our ~ example:

~ = ¬ '~' int  ` ( $ ~(int)

` means 'followed by'. type(" ") is the data type your definition uses. ~ = ¬ '~' ` (type("stack").push)]