Very small top down parser as a university project.
It recognises strings formed by "begin...end" blocks and "(...)" blocks which must not overlap. The grammar has to start by a begin instruction. It then turns the input string in a correctly indented text.