Crafting Interpreters Flashcards
What is lexing ?
The process of converting a stream of characters into tokens
which are defined in the lexicon of the language.
What is parsing ?
The process of converting the tokens into a tree like structure called an abstract syntax tree.
What is static analysis ?
Its a phase in the program generation where type checks are made, the nodes in the AST are analyzed and the values of identifiers are determined. It is also where scoping rules are applied.
What is an Intermediate Representation IR
?
Its a form the AST gets transformed to which is independent of any lanugage implementation or target platform. The purpose is to reduce the amount of work needed to implement the backend of the compilation process. By having a compiler backend per target platform, as opposed to per language and target platform combination.