Crafting Interpreters Flashcards

1
Q

What is lexing ?

A

The process of converting a stream of characters into tokens which are defined in the lexicon of the language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is parsing ?

A

The process of converting the tokens into a tree like structure called an abstract syntax tree.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is static analysis ?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an Intermediate Representation IR ?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly