This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
2.1 Phases of translation
A C# program consists of one or more source files. A source file is an ordered sequence of Unicode characters. Source files typically have a one-to-one correspondence with files in a file system, but this correspondence is not required by C#.
Conceptually speaking, a program is compiled using four steps:
- Pre-processing, a text-to-text translation that enables conditional inclusion and exclusion of program text.
- Lexical analysis, which translates a stream of input characters into a stream of tokens.
- Syntactic analysis, which translates the stream of tokens into executable code.