Requirements
Indentation sensitive
There are two categories of sub-languages in Arplan: either they are indentation sensitive or they are not. For the indentation sensitive ones, Arplan uses end-of-line also as end-of-statement. This means that there is the restriction that a statement cannot be split accross different lines. This restriction has been taken into account because it both simplifies and provides some advantages during parsing.
Let us take a small example program:
this is a simple line
this is a header line
bla bla bla
bli bli bli
some more content
even more content
blo blo blo
and yet another line
In this example, each color might be associated to a distinct language. Indeed, the language of an indented block is determined by it's header line. Hence, the language of the green block depends on the blue header line.
This also means we cannot parse all at once but be a bit more subtle.
A single line can also mix languages but this is explained later.
Independent complex sub-languages
Syntax imports
Parrallel
Meaningful errors
Language extension support