To my knowledge, in block-structured programming languages, there are 2, maybe 3 main ways of delimiting a block.
- Using start and end tokens, this can be brackets or reserved words etc
- Using indentation, like python, which uses the offside rule to delimit blocks
- Using prefix notation for control structures, like lisp/s-expressions (maybe this is equivalent to 1).
If we consider programs as strings of symbols, then a block-delimiting-scheme is the information in a program for uniquely specifying subprograms.
So for example, we could delimit blocks by using symbol/token/line number indices, e.g
if condition 4,7 14,32
(might relate to labels in assembly or basic).
My question is, what are all the ways of delimiting blocks?