In many languages, the nature of whitespace is insignificant, but it is necessary to have whitespace between language tokens and not within them. Compiler I: Syntax Analysis Elements of Computing Systems, Nisan & Schocken, MIT Press,, Chapter 10: Compiler I: Syntax Analysis slide 2 Course map Assembler Chapter 6 H.L. In Python, whitespace is used to end statements, and also to define statement grouping. Similarly, in the BASIC I used in my first home computers, a newline was the only significant space, and that required a new line number and statement. As the name suggests, the challenge is to analyze the syntax and see if it is correct or not. All the questions we asked earlier represent a problem that is significant to compiler design called Syntax Analysis.
10 was an assignment of the value 1.1 to variable DO10I. But we will talk about a concept that is a core component of the compiler: Context Free Grammars. This made parsing difficult, since DO 10 I = 1, 10 was a loop statement, and DO 10 I = 1.
In old-fashioned FORTRAN, a statement would have to be in certain columns (7-72), and end-of-card would end a statement unless there was a continuation character in column 6 of the next card, but whitespace in columns 7-72 was completely optional. In C and C++, preprocessor directives end with a newline, but other than that whitespace is whitespace. (I'm not talking about whitespace in quoted strings or anything like that, only making up statements.) There are, and have been, all sorts of ways whitespace is treated.