How Compiler Works?

How compiler works is not easy to explain in one sentence. The best way is to use an example. A compiler is a computer program that transforms source code written in a high-level programming language into a lower level language. Basically, a compiler consists the following phases: Lexical Analysis, Syntax Analysis, Semantic Analysis, IR Generation, … Read more