PEG

A Parser has an input stream, a set of rules (generated from an extended **PEG**) that recognise input Structure and generate output structures, an output stream to collect generated output, and a current result (semantic value from the most recent Expression) that can be read and written within rules.

~

PEG-based transformer provides front-, middle and back-end stages in a simple compiler. pdf

In computer programming, an S-expression (or symbolic Expression, abbreviated as sexpr or sexp) is an expression in a like-named notation for nested list (tree-structured) data. S-expressions were invented for and popularized by the programming language Lisp, which uses them for source code as well as data. wikipedia