A parser is one stage of Compilation where the raw code is taken and broken down.

Parsing typically gets broken down into two phases: Lexical Analysis and Syntactic Analysis.

  1. Lexical Analysis - where tokens are broken down to indiviual components.

  2. Syntactic Analysis takes the tokens and reformats them into an Abstract Syntax Tree, or AST for short.