As mtail is designed to tail log files and apply regular expressions to new log lines to extract data, the language naturally follows this pattern-action style.
It resembles another, more famous pattern-action language, that of AWK.
mtail runs all programs on every line received by the log tailing subsystem. The rough model of this looks like: