Base indentation on Esterel keywords rather
than parentheses and brackets, as used in the base class. Lines are
classified into four nonoverlapping categories: start, end,
to-be-continued (tbc), and other. Let "line" denote the current line,
"pline" denote the first (non-blank, non-comment) line previous to the one
being indented, and "ppline" denote the first (non-blank, non-comment)
line before that. The indentation algorithm is then:
if (pline == start) indent+4
if (line == end) indent-4
if (pline == tbc && ppline != tbc && line != end) indent+8
if (pline == tbc && ppline == tbc && line == end) indent-8
if (pline != tbc && pline != end && ppline == tbc && pline != end)
indent-8
Lines of class "start" are those that start an indented block.
Lines of class "end" end an indented block.
"To-be-continued" (tbc) lines are neither start or end, and do not end in a
semicolon. "Other" lines are none of the above.
The syntax "indent+4" above means that we increase the indentation
by 4 spaces.